appprofile.example.php 14 KB

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