singbox.json 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258
  1. {
  2. "log": {
  3. "level": "info",
  4. "timestamp": true
  5. },
  6. "dns": {
  7. "servers": [
  8. {
  9. "tag": "remote",
  10. "address": "https://8.8.8.8/dns-query",
  11. "detour": "select"
  12. },
  13. {
  14. "tag": "local",
  15. "address": "https://223.5.5.5/dns-query",
  16. "detour": "direct"
  17. },
  18. {
  19. "tag": "block",
  20. "address": "rcode://success"
  21. },
  22. {
  23. "tag": "fakeip",
  24. "address": "fakeip"
  25. }
  26. ],
  27. "rules": [
  28. {
  29. "outbound": "any",
  30. "server": "local"
  31. },
  32. {
  33. "query_type": [
  34. "A",
  35. "AAAA"
  36. ],
  37. "server": "fakeip",
  38. "rewrite_ttl": 1
  39. },
  40. {
  41. "clash_mode": "Global",
  42. "server": "remote"
  43. },
  44. {
  45. "clash_mode": "Direct",
  46. "server": "local"
  47. },
  48. {
  49. "rule_set": "geosite-geolocation-cn",
  50. "server": "local"
  51. },
  52. {
  53. "clash_mode": "Default",
  54. "server": "remote"
  55. },
  56. {
  57. "type": "logical",
  58. "mode": "and",
  59. "rules": [
  60. {
  61. "rule_set": "geosite-geolocation-!cn",
  62. "invert": true
  63. },
  64. {
  65. "rule_set": "geoip-cn"
  66. }
  67. ],
  68. "server": "local"
  69. }
  70. ],
  71. "fakeip": {
  72. "enabled": true,
  73. "inet4_range": "198.18.0.0/15",
  74. "inet6_range": "fc00::/18"
  75. },
  76. "strategy": "prefer_ipv4",
  77. "independent_cache": true
  78. },
  79. "inbounds": [
  80. {
  81. "type": "mixed",
  82. "tag": "mixed-in",
  83. "listen": "0.0.0.0",
  84. "listen_port": 10172,
  85. "tcp_fast_open":true,
  86. "sniff": false,
  87. "sniff_override_destination": false,
  88. "domain_strategy": "prefer_ipv4",
  89. "set_system_proxy": false
  90. },
  91. {
  92. "type": "socks",
  93. "tag": "socks-in",
  94. "listen": "0.0.0.0",
  95. "listen_port": 10173,
  96. "tcp_fast_open":true,
  97. "sniff": false,
  98. "sniff_override_destination": false,
  99. "domain_strategy": "prefer_ipv4"
  100. },
  101. {
  102. "type": "mixed",
  103. "tag": "mixed-in2",
  104. "listen": "0.0.0.0",
  105. "listen_port": 10174,
  106. "tcp_fast_open":true,
  107. "sniff": false,
  108. "sniff_override_destination": false,
  109. "domain_strategy": "prefer_ipv4",
  110. "set_system_proxy": false
  111. },
  112. {
  113. "type": "mixed",
  114. "tag": "mixed-in3",
  115. "listen": "0.0.0.0",
  116. "listen_port": 10175,
  117. "tcp_fast_open":true,
  118. "sniff": false,
  119. "sniff_override_destination": false,
  120. "domain_strategy": "prefer_ipv4",
  121. "set_system_proxy": false
  122. }
  123. ],
  124. "outbounds": [
  125. {
  126. "type": "selector",
  127. "tag": "select",
  128. "outbounds": [
  129. "urltest"
  130. ],
  131. "default": "urltest"
  132. },
  133. {
  134. "type": "urltest",
  135. "tag": "urltest",
  136. "interval": "30m",
  137. "idle_timeout": "60m",
  138. "interrupt_exist_connections": false,
  139. "outbounds": null
  140. },
  141. {
  142. "type": "direct",
  143. "tag": "direct"
  144. },
  145. {
  146. "type": "block",
  147. "tag": "block"
  148. },
  149. {
  150. "type": "dns",
  151. "tag": "dns-out"
  152. }
  153. ],
  154. "route": {
  155. "rules": [
  156. {
  157. "type": "logical",
  158. "mode": "or",
  159. "rules": [
  160. {
  161. "protocol": "dns"
  162. },
  163. {
  164. "port": 53
  165. }
  166. ],
  167. "outbound": "dns-out"
  168. },
  169. {
  170. "ip_is_private": true,
  171. "outbound": "direct"
  172. },
  173. {
  174. "inbound":[
  175. "mixed-in2"
  176. ],
  177. "outbound":"select2"
  178. },
  179. {
  180. "inbound":[
  181. "mixed-in3"
  182. ],
  183. "outbound":"select3"
  184. },
  185. {
  186. "clash_mode": "Direct",
  187. "outbound": "direct"
  188. },
  189. {
  190. "clash_mode": "Global",
  191. "outbound": "select"
  192. },
  193. {
  194. "type": "logical",
  195. "mode": "or",
  196. "rules": [
  197. {
  198. "port": 853
  199. },
  200. {
  201. "network": "udp",
  202. "port": 443
  203. },
  204. {
  205. "protocol": "stun"
  206. }
  207. ],
  208. "outbound": "block"
  209. },
  210. {
  211. "rule_set": [
  212. "geoip-cn",
  213. "geosite-geolocation-cn"
  214. ],
  215. "outbound": "direct"
  216. }
  217. ],
  218. "rule_set": [
  219. {
  220. "type": "remote",
  221. "tag": "geoip-cn",
  222. "format": "binary",
  223. "url": "https://raw.githubusercontent.com/SagerNet/sing-geoip/rule-set/geoip-cn.srs",
  224. "download_detour": "select"
  225. },
  226. {
  227. "type": "remote",
  228. "tag": "geosite-geolocation-cn",
  229. "format": "binary",
  230. "url": "https://raw.githubusercontent.com/SagerNet/sing-geosite/rule-set/geosite-geolocation-cn.srs",
  231. "download_detour": "select"
  232. },
  233. {
  234. "type": "remote",
  235. "tag": "geosite-geolocation-!cn",
  236. "format": "binary",
  237. "url": "https://raw.githubusercontent.com/SagerNet/sing-geosite/rule-set/geosite-geolocation-!cn.srs",
  238. "download_detour": "select"
  239. }
  240. ],
  241. "auto_detect_interface": false
  242. },
  243. "experimental": {
  244. "cache_file": {
  245. "enabled": true,
  246. "store_rdrc": true
  247. },
  248. "clash_api": {
  249. "external_controller": "0.0.0.0:19090",
  250. "external_ui": "ui",
  251. "external_ui_download_url": "https://github.com/MetaCubeX/metacubexd/archive/refs/heads/gh-pages.zip",
  252. "external_ui_download_detour": "select",
  253. "default_mode": "rule"
  254. }
  255. }
  256. }