appprofile.example.php 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465
  1. <?php
  2. declare(strict_types=1);
  3. /**
  4. * default 为默认配置,你可以添加其他配置,但必须保证默认配置存在
  5. *
  6. * Checks 填写为没有直接在规则文件中使用的并且使用了筛选规则且组内或可能无节点的策略组名
  7. * - 例如使用 regex 分类国家分组,未匹配时组内无节点,此类需要填入 Checks 中以保证配置文件无误
  8. *
  9. * Surge 以及 Surfboard 的 General 中,布尔值请填写为字符串
  10. *
  11. * Surge 以及 Surfboard 的 Proxy 中,请填写为该应用的格式
  12. * Clash 的 Proxy 中,请填写为数组
  13. */
  14. /**
  15. * Surge 配置文件定义
  16. */
  17. $_ENV['Surge_Profiles'] = [
  18. 'default' => [
  19. 'Checks' => [],
  20. 'General' => [
  21. 'loglevel' => 'notify',
  22. 'dns-server' => 'system, 119.29.29.29, 1.1.1.1',
  23. 'skip-proxy' => '127.0.0.1, 192.168.0.0/16, 10.0.0.0/8, 172.16.0.0/12, 100.64.0.0/10, 17.0.0.0/8, localhost, *.local, *.crashlytics.com',
  24. 'external-controller-access' => '[email protected]:8233',
  25. 'allow-wifi-access' => 'true',
  26. 'enhanced-mode-by-rule' => 'false',
  27. 'exclude-simple-hostnames' => 'true',
  28. 'show-error-page-for-reject' => 'true',
  29. 'ipv6' => 'true',
  30. 'replica' => 'false',
  31. 'http-listen' => '0.0.0.0:8234',
  32. 'socks5-listen' => '0.0.0.0:8235',
  33. 'wifi-access-http-port' => 6152,
  34. 'wifi-access-socks5-port' => 6153,
  35. 'internet-test-url' => 'http://wifi.vivo.com.cn/generate_204',
  36. 'proxy-test-url' => 'http://cp.cloudflare.com',
  37. 'test-timeout' => 3,
  38. ],
  39. 'Proxy' => [
  40. '🚀直接连接 = direct',
  41. ],
  42. 'ProxyGroup' => [
  43. [
  44. 'name' => '🔰国外流量',
  45. 'type' => 'select',
  46. 'content' => [
  47. 'regex' => '(.*)',
  48. 'right-proxies' => [
  49. '🚀直接连接',
  50. ],
  51. ],
  52. ],
  53. [
  54. 'name' => '⚓️其他流量',
  55. 'type' => 'select',
  56. 'content' => [
  57. 'left-proxies' => [
  58. '🔰国外流量',
  59. '🚀直接连接',
  60. ],
  61. ],
  62. ],
  63. [
  64. 'name' => '✈️Telegram',
  65. 'type' => 'select',
  66. 'content' => [
  67. 'left-proxies' => [
  68. '🔰国外流量',
  69. ],
  70. 'regex' => '(.*)',
  71. ],
  72. ],
  73. [
  74. 'name' => '🎬Youtube',
  75. 'type' => 'select',
  76. 'content' => [
  77. 'left-proxies' => [
  78. '🔰国外流量',
  79. ],
  80. 'regex' => '(.*)',
  81. ],
  82. ],
  83. [
  84. 'name' => '🎬Netflix',
  85. 'type' => 'select',
  86. 'content' => [
  87. 'left-proxies' => [
  88. '🔰国外流量',
  89. ],
  90. 'regex' => '(.*)',
  91. ],
  92. ],
  93. [
  94. 'name' => '🎬哔哩哔哩',
  95. 'type' => 'select',
  96. 'content' => [
  97. 'left-proxies' => [
  98. '🚀直接连接',
  99. ],
  100. 'regex' => '(.*)',
  101. ],
  102. ],
  103. [
  104. 'name' => '🎬国外媒体',
  105. 'type' => 'select',
  106. 'content' => [
  107. 'left-proxies' => [
  108. '🔰国外流量',
  109. ],
  110. 'regex' => '(.*)',
  111. ],
  112. ],
  113. [
  114. 'name' => '🍎苹果服务',
  115. 'type' => 'select',
  116. 'content' => [
  117. 'left-proxies' => [
  118. '🚀直接连接',
  119. '🔰国外流量',
  120. ],
  121. ],
  122. ],
  123. ],
  124. 'Rule' => [
  125. 'source' => 'surge/default.tpl',
  126. ],
  127. ],
  128. ];
  129. /**
  130. * Surge 2.x 版本的配置文件定义
  131. */
  132. $_ENV['Surge2_Profiles'] = [
  133. 'default' => [
  134. 'Checks' => [],
  135. 'General' => [
  136. 'loglevel' => 'notify',
  137. 'ipv6' => 'true',
  138. 'replica' => 'false',
  139. 'dns-server' => 'system, 119.29.29.29, 1.1.1.1',
  140. 'skip-proxy' => '127.0.0.1, 192.168.0.0/16, 10.0.0.0/8, 172.16.0.0/12, 100.64.0.0/10, 17.0.0.0/8, localhost, *.local, *.crashlytics.com',
  141. 'bypass-system' => 'true',
  142. 'allow-wifi-access' => 'true',
  143. 'external-controller-access' => '[email protected]:8233',
  144. ],
  145. 'Proxy' => [
  146. '🚀直接连接 = direct',
  147. ],
  148. 'ProxyGroup' => [
  149. [
  150. 'name' => '🔰国外流量',
  151. 'type' => 'select',
  152. 'content' => [
  153. 'regex' => '(.*)',
  154. 'right-proxies' => [
  155. '🚀直接连接',
  156. ],
  157. ],
  158. ],
  159. [
  160. 'name' => '⚓️其他流量',
  161. 'type' => 'select',
  162. 'content' => [
  163. 'left-proxies' => [
  164. '🔰国外流量',
  165. '🚀直接连接',
  166. ],
  167. ],
  168. ],
  169. [
  170. 'name' => '✈️Telegram',
  171. 'type' => 'select',
  172. 'content' => [
  173. 'left-proxies' => [
  174. '🔰国外流量',
  175. ],
  176. 'regex' => '(.*)',
  177. ],
  178. ],
  179. [
  180. 'name' => '🎬Youtube',
  181. 'type' => 'select',
  182. 'content' => [
  183. 'left-proxies' => [
  184. '🔰国外流量',
  185. ],
  186. 'regex' => '(.*)',
  187. ],
  188. ],
  189. [
  190. 'name' => '🎬Netflix',
  191. 'type' => 'select',
  192. 'content' => [
  193. 'left-proxies' => [
  194. '🔰国外流量',
  195. ],
  196. 'regex' => '(.*)',
  197. ],
  198. ],
  199. [
  200. 'name' => '🎬哔哩哔哩',
  201. 'type' => 'select',
  202. 'content' => [
  203. 'left-proxies' => [
  204. '🚀直接连接',
  205. ],
  206. 'regex' => '(.*)',
  207. ],
  208. ],
  209. [
  210. 'name' => '🎬国外媒体',
  211. 'type' => 'select',
  212. 'content' => [
  213. 'left-proxies' => [
  214. '🔰国外流量',
  215. ],
  216. 'regex' => '(.*)',
  217. ],
  218. ],
  219. [
  220. 'name' => '🍎苹果服务',
  221. 'type' => 'select',
  222. 'content' => [
  223. 'left-proxies' => [
  224. '🚀直接连接',
  225. '🔰国外流量',
  226. ],
  227. ],
  228. ],
  229. ],
  230. 'Rule' => [
  231. 'source' => 'surge2/default.tpl',
  232. ],
  233. ],
  234. ];
  235. /**
  236. * Clash 配置文件定义
  237. */
  238. $_ENV['Clash_Profiles'] = [
  239. 'default' => [
  240. 'Checks' => [],
  241. 'General' => [
  242. 'port' => 7890,
  243. 'socks-port' => 7891,
  244. 'redir-port' => 7892,
  245. 'allow-lan' => false,
  246. 'mode' => 'rule',
  247. 'log-level' => 'silent',
  248. 'external-controller' => '0.0.0.0:9090',
  249. 'secret' => '',
  250. ],
  251. 'DNS' => [
  252. 'enable' => true,
  253. 'ipv6' => false,
  254. 'listen' => '0.0.0.0:53',
  255. 'enhanced-mode' => 'fake-ip',
  256. 'fake-ip-range' => '198.18.0.1/16',
  257. 'nameserver' => [
  258. '119.29.29.29',
  259. '1.1.1.1',
  260. ],
  261. 'fallback' => [
  262. '1.0.0.1',
  263. '8.8.8.8',
  264. ],
  265. 'fallback-filter' => [
  266. 'geoip' => true,
  267. 'ipcidr' => [
  268. '240.0.0.0/4',
  269. ],
  270. ],
  271. ],
  272. 'Proxy' => [],
  273. 'ProxyGroup' => [
  274. [
  275. 'name' => '🔰国外流量',
  276. 'type' => 'select',
  277. 'content' => [
  278. 'regex' => '(.*)',
  279. 'right-proxies' => [
  280. '🚀直接连接',
  281. ],
  282. ],
  283. ],
  284. [
  285. 'name' => '⚓️其他流量',
  286. 'type' => 'select',
  287. 'content' => [
  288. 'left-proxies' => [
  289. '🔰国外流量',
  290. '🚀直接连接',
  291. ],
  292. ],
  293. ],
  294. [
  295. 'name' => '✈️Telegram',
  296. 'type' => 'select',
  297. 'content' => [
  298. 'left-proxies' => [
  299. '🔰国外流量',
  300. ],
  301. 'regex' => '(.*)',
  302. ],
  303. ],
  304. [
  305. 'name' => '🎬Youtube',
  306. 'type' => 'select',
  307. 'content' => [
  308. 'left-proxies' => [
  309. '🔰国外流量',
  310. ],
  311. 'regex' => '(.*)',
  312. ],
  313. ],
  314. [
  315. 'name' => '🎬Netflix',
  316. 'type' => 'select',
  317. 'content' => [
  318. 'left-proxies' => [
  319. '🔰国外流量',
  320. ],
  321. 'regex' => '(.*)',
  322. ],
  323. ],
  324. [
  325. 'name' => '🎬哔哩哔哩',
  326. 'type' => 'select',
  327. 'content' => [
  328. 'left-proxies' => [
  329. '🚀直接连接',
  330. ],
  331. 'regex' => '(.*)',
  332. ],
  333. ],
  334. [
  335. 'name' => '🎬国外媒体',
  336. 'type' => 'select',
  337. 'content' => [
  338. 'left-proxies' => [
  339. '🔰国外流量',
  340. ],
  341. 'regex' => '(.*)',
  342. ],
  343. ],
  344. [
  345. 'name' => '🍎苹果服务',
  346. 'type' => 'select',
  347. 'content' => [
  348. 'left-proxies' => [
  349. '🚀直接连接',
  350. '🔰国外流量',
  351. ],
  352. ],
  353. ],
  354. [
  355. 'name' => '🚀直接连接',
  356. 'type' => 'select',
  357. 'content' => [
  358. 'left-proxies' => [
  359. 'DIRECT',
  360. ],
  361. ],
  362. ],
  363. ],
  364. 'Rule' => [
  365. 'source' => 'clash/default.tpl',
  366. ],
  367. ],
  368. ];
  369. /**
  370. * Surfboard 配置文件定义
  371. */
  372. $_ENV['Surfboard_Profiles'] = [
  373. 'default' => [
  374. 'Checks' => [],
  375. 'General' => [
  376. 'loglevel' => 'notify',
  377. 'dns-server' => 'system, 119.29.29.29, 1.1.1.1',
  378. 'skip-proxy' => '127.0.0.1, 192.168.0.0/16, 10.0.0.0/8, 172.16.0.0/12, 100.64.0.0/10, 17.0.0.0/8, localhost, *.local, *.crashlytics.com',
  379. ],
  380. 'Proxy' => [
  381. '🚀直接连接 = direct',
  382. ],
  383. 'ProxyGroup' => [
  384. [
  385. 'name' => '🔰国外流量',
  386. 'type' => 'select',
  387. 'content' => [
  388. 'regex' => '(.*)',
  389. 'right-proxies' => [
  390. '🚀直接连接',
  391. ],
  392. ],
  393. ],
  394. [
  395. 'name' => '⚓️其他流量',
  396. 'type' => 'select',
  397. 'content' => [
  398. 'left-proxies' => [
  399. '🔰国外流量',
  400. '🚀直接连接',
  401. ],
  402. ],
  403. ],
  404. [
  405. 'name' => '✈️Telegram',
  406. 'type' => 'select',
  407. 'content' => [
  408. 'left-proxies' => [
  409. '🔰国外流量',
  410. ],
  411. 'regex' => '(.*)',
  412. ],
  413. ],
  414. [
  415. 'name' => '🎬Youtube',
  416. 'type' => 'select',
  417. 'content' => [
  418. 'left-proxies' => [
  419. '🔰国外流量',
  420. ],
  421. 'regex' => '(.*)',
  422. ],
  423. ],
  424. [
  425. 'name' => '🎬Netflix',
  426. 'type' => 'select',
  427. 'content' => [
  428. 'left-proxies' => [
  429. '🔰国外流量',
  430. ],
  431. 'regex' => '(.*)',
  432. ],
  433. ],
  434. [
  435. 'name' => '🎬哔哩哔哩',
  436. 'type' => 'select',
  437. 'content' => [
  438. 'left-proxies' => [
  439. '🚀直接连接',
  440. ],
  441. 'regex' => '(.*)',
  442. ],
  443. ],
  444. [
  445. 'name' => '🎬国外媒体',
  446. 'type' => 'select',
  447. 'content' => [
  448. 'left-proxies' => [
  449. '🔰国外流量',
  450. ],
  451. 'regex' => '(.*)',
  452. ],
  453. ],
  454. ],
  455. 'Rule' => [
  456. 'source' => 'surfboard/default.tpl',
  457. ],
  458. ],
  459. ];