Menu Close

常用域名路由分流配置文件汇总|解锁奈飞、动画疯、迪士尼|ipv4/ipv6分流

群里有小伙伴询问路由分流的配置文件写法,我来将个人常用的分流配置简单汇总下。我这里只包含outbounds和routing部分,配置文件中的参数不要照抄,请根据自己的实际情况自行替换。

  1. #分流1
  2. “outbounds”: [
  3. {
  4. “protocol”: “freedom”,
  5. “settings”: {}
  6. },
  7. {
  8. “tag”: “VPS1”,
  9. “protocol”: “shadowsocks”,
  10. “settings”: {
  11. “servers”: [
  12. {
  13. “address”: “8.8.8.8”,
  14. “method”: “aes-128-gcm”,
  15. “ota”: false,
  16. “password”: “passwd”,
  17. “port”: 7899
  18. }
  19. ]
  20. }
  21. }
  22. ],
  23. “routing”: {
  24. “rules”: [
  25. {
  26. “type”: “field”,
  27. “outboundTag”: “VPS1”,
  28. “domain”: [“geosite:netflix”,“geosite:google”,“geosite:youtube”,“geosite:disney”,“geosite:bahamut”]
  29. }
  30. ]
  31. }
  32.  
  33. #分流2
  34. “outbounds”: [
  35. {
  36. “protocol”: “freedom”,
  37. “settings”: {}
  38. },
  39. {
  40. “tag”: “VPS1”,
  41. “protocol”: “socks”,
  42. “settings”: {
  43. “servers”: [
  44. {
  45. “address”: “8.8.8.8”,
  46. “ota”: false,
  47. “port”: 7899,
  48. “users”: [
  49. {
  50. “user”: “admin”,
  51. “pass”: “passwd”
  52. }
  53. ]
  54. }
  55. ]
  56. }
  57. }
  58. ],
  59. “routing”: {
  60. “rules”: [
  61. {
  62. “type”: “field”,
  63. “outboundTag”: “VPS1”,
  64. “domain”: [“geosite:netflix”,“geosite:google”,“geosite:youtube”,“geosite:disney”,“geosite:bahamut”]
  65. }
  66. ]
  67. }
  68.  
  69. #任意门
  70. {
  71. “port”: 30784,
  72. “protocol”: “dokodemo-door”,
  73. “settings”: {
  74. “address”: “8.8.8.8”,
  75. “port”: 7899,
  76. “network”: “tcp,udp”
  77. }
  78. }
  79.  
  80. #转发
  81. “outbounds”: [
  82. {
  83. “tag”: “VPS1”,
  84. “protocol”: “shadowsocks”,
  85. “settings”: {
  86. “servers”: [
  87. {
  88. “address”: “8.8.8.8”,
  89. “method”: “aes-128-gcm”,
  90. “ota”: false,
  91. “password”: “passwd”,
  92. “port”: 7899
  93. }
  94. ]
  95. }
  96. }
  97. ],
  98. “routing”: {
  99. “rules”: [ ]
  100. }
  101.  
  102. #转发2
  103. “outbounds”: [
  104. {
  105. “tag”: “VPS1”,
  106. “protocol”: “socks”,
  107. “settings”: {
  108. “servers”: [
  109. {
  110. “address”: “8.8.8.8”,
  111. “ota”: false,
  112. “port”: 7899,
  113. “users”: [
  114. {
  115. “user”: “admin”,
  116. “pass”: “passwd”
  117. }
  118. ]
  119. }
  120. ]
  121. }
  122. }
  123. ],
  124. “routing”: {
  125. “rules”: [
  126. ]
  127. }
  128.  
  129. #IPV4
  130. “outbounds”: [
  131. {
  132. “tag”:“IP4_out”,
  133. “protocol”: “freedom”,
  134. “settings”: {
  135. “domainStrategy”: “UseIPv4”
  136. }
  137. }
  138. ]
  139.  
  140. #IPV6
  141. “outbounds”: [
  142. {
  143. “protocol”: “freedom”,
  144. “settings”: {}
  145. },
  146. {
  147. “tag”:“IP6_out”,
  148. “protocol”: “freedom”,
  149. “settings”: {
  150. “domainStrategy”: “UseIPv6”
  151. }
  152. }
  153. ],
  154. “routing”: {
  155. “rules”: [
  156. {
  157. “type”: “field”,
  158. “outboundTag”: “IP6_out”,
  159. “domain”: [“geosite:netflix”,“geosite:google”,“geosite:youtube”,“geosite:disney”,“geosite:bahamut”]
  160. }
  161. ]
  162. }
  163.  
  164. #DNS分流1
  165. “outbounds”: [
  166. {
  167. “protocol”: “freedom”,
  168. “settings”: {“domainStrategy”: “UseIP”}
  169. }
  170. ],
  171. “routing”: {
  172. “rules”: [ ]
  173. },
  174. “dns”: {
  175. “servers”: [
  176. “8.8.8.8”,
  177. {
  178. “address”: “11.11.11.11”,
  179. “port”: 53,
  180. “domains”: [“geosite:netflix”,“geosite:google”,“geosite:youtube”,“geosite:disney”,“geosite:bahamut”]
  181. }
  182. ]
  183. }
  184.  
  185. #屏蔽cn
  186. “outbounds”: [
  187. {
  188. “protocol”: “freedom”,
  189. “settings”: {},
  190. “tag”: “direct”
  191. },
  192. {
  193. “protocol”: “blackhole”,
  194. “settings”: {},
  195. “tag”: “blocked”
  196. }
  197. ],
  198. “routing”: {
  199. “domainStrategy”: “IPIfNonMatch”,
  200. “rules”: [
  201. {
  202. “type”: “field”,
  203. “inboundTag”: [
  204. “api”
  205. ],
  206. “outboundTag”: “api”
  207. },
  208. {
  209. “type”: “field”,
  210. “outboundTag”: “blocked”,
  211. “domain”: [
  212. “geosite:cn”
  213. ]
  214. },
  215. {
  216. “type”: “field”,
  217. “outboundTag”: “blocked”,
  218. “ip”: [
  219. “geoip:cn”
  220. ]
  221. },
  222. {
  223. “type”: “field”,
  224. “outboundTag”: “blocked”,
  225. “ip”: [
  226. “geoip:private”
  227. ]
  228. },
  229. {
  230. “type”: “field”,
  231. “outboundTag”: “blocked”,
  232. “protocol”: [
  233. “bittorrent”
  234. ]
  235. }
  236. ]
  237. }
  238.  
  239. #对外开放 v2ray 的 DNS 服务
  240. {
  241. “inbounds”: [
  242. {
  243. “tag”: “dns-in”,
  244. “port”: 53,
  245. “protocol”: “dokodemo-door”,
  246. “settings”: {
  247. “address”: “8.8.8.8”,
  248. “port”: 53,
  249. “network”: “tcp,udp”,
  250. “userLevel”: 1
  251. }
  252. }
  253. ],
  254. “outbounds”: [
  255. {
  256. “protocol”: “dns”,
  257. “tag”: “dns-out”
  258. }
  259. ],
  260. “routing”: {
  261. “rules”: [
  262. {
  263. “type”: “field”,
  264. “inboundTag”: [
  265. “dns-in”
  266. ],
  267. “outboundTag”: “dns-out”
  268. }
  269. ]
  270. }
  271. }

发表回复

您的电子邮箱地址不会被公开。