singbox.json 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201
  1. {
  2. "log": {
  3. "level": "debug",
  4. "timestamp": true
  5. },
  6. "dns": {
  7. "servers": [
  8. {
  9. "tag": "remote",
  10. "address": "https://8.8.8.8/dns-query",
  11. "strategy": "prefer_ipv4",
  12. "detour": "select"
  13. },
  14. {
  15. "tag": "local",
  16. "address": "https://223.5.5.5/dns-query",
  17. "strategy": "prefer_ipv4",
  18. "detour": "direct"
  19. },
  20. {
  21. "tag": "block",
  22. "address": "rcode://success"
  23. },
  24. {
  25. "tag": "fakeip",
  26. "address": "fakeip"
  27. }
  28. ],
  29. "rules": [
  30. {
  31. "outbound": ["any"],
  32. "server": "local"
  33. },
  34. {
  35. "clash_mode": "Global",
  36. "server": "remote"
  37. },
  38. {
  39. "clash_mode": "Direct",
  40. "server": "local"
  41. }
  42. ],
  43. "fakeip": {
  44. "enabled": true,
  45. "inet4_range": "198.18.0.0/15",
  46. "inet6_range": "fc00::/18"
  47. },
  48. "strategy": "prefer_ipv4",
  49. "independent_cache": true,
  50. "reverse_mapping": true
  51. },
  52. "inbounds": [
  53. {
  54. "type": "mixed",
  55. "tag": "mixed-in",
  56. "listen": "0.0.0.0",
  57. "listen_port": 10172,
  58. "tcp_fast_open":true,
  59. "sniff": false,
  60. "sniff_override_destination": false,
  61. "domain_strategy": "prefer_ipv4",
  62. "set_system_proxy": false
  63. },
  64. {
  65. "type": "socks",
  66. "tag": "socks-in",
  67. "listen": "0.0.0.0",
  68. "listen_port": 10173,
  69. "tcp_fast_open":true,
  70. "sniff": false,
  71. "sniff_override_destination": false,
  72. "domain_strategy": "prefer_ipv4"
  73. },
  74. {
  75. "type": "mixed",
  76. "tag": "mixed-in2",
  77. "listen": "0.0.0.0",
  78. "listen_port": 10174,
  79. "tcp_fast_open":true,
  80. "sniff": false,
  81. "sniff_override_destination": false,
  82. "domain_strategy": "prefer_ipv4",
  83. "set_system_proxy": false
  84. },
  85. {
  86. "type": "mixed",
  87. "tag": "mixed-in3",
  88. "listen": "0.0.0.0",
  89. "listen_port": 10175,
  90. "tcp_fast_open":true,
  91. "sniff": false,
  92. "sniff_override_destination": false,
  93. "domain_strategy": "prefer_ipv4",
  94. "set_system_proxy": false
  95. }
  96. ],
  97. "outbounds": [
  98. {
  99. "type": "selector",
  100. "tag": "select",
  101. "outbounds": [
  102. "urltest"
  103. ],
  104. "default": "urltest"
  105. },
  106. {
  107. "type": "urltest",
  108. "tag": "urltest",
  109. "interval": "30m",
  110. "idle_timeout": "60m",
  111. "interrupt_exist_connections": false,
  112. "outbounds": null
  113. },
  114. {
  115. "type": "direct",
  116. "tag": "direct"
  117. },
  118. {
  119. "type": "block",
  120. "tag": "block"
  121. },
  122. {
  123. "type": "dns",
  124. "tag": "dns-out"
  125. }
  126. ],
  127. "route": {
  128. "rules": [
  129. {
  130. "type": "logical",
  131. "mode": "or",
  132. "rules": [
  133. {
  134. "protocol": "dns"
  135. },
  136. {
  137. "port": 53
  138. }
  139. ],
  140. "outbound": "dns-out"
  141. },
  142. {
  143. "ip_is_private": true,
  144. "outbound": "direct"
  145. },
  146. {
  147. "inbound":[
  148. "mixed-in2"
  149. ],
  150. "outbound":"select2"
  151. },
  152. {
  153. "inbound":[
  154. "mixed-in3"
  155. ],
  156. "outbound":"select3"
  157. },
  158. {
  159. "clash_mode": "Direct",
  160. "outbound": "direct"
  161. },
  162. {
  163. "clash_mode": "Global",
  164. "outbound": "select"
  165. },
  166. {
  167. "type": "logical",
  168. "mode": "or",
  169. "rules": [
  170. {
  171. "port": 853
  172. },
  173. {
  174. "network": "udp",
  175. "port": 443
  176. },
  177. {
  178. "protocol": "stun"
  179. }
  180. ],
  181. "outbound": "block"
  182. }
  183. ],
  184. "auto_detect_interface": false
  185. },
  186. "experimental": {
  187. "cache_file": {
  188. "enabled": true,
  189. "store_rdrc": true
  190. },
  191. "clash_api": {
  192. "external_controller": "0.0.0.0:19090",
  193. "external_ui": "ui",
  194. "external_ui_download_url": "https://github.com/MetaCubeX/metacubexd/archive/refs/heads/gh-pages.zip",
  195. "external_ui_download_detour": "select",
  196. "default_mode": "Rule"
  197. }
  198. }
  199. }