Advertisement
Guest User

RunPython - Reddit

a guest
Mar 4th, 2025
367
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.04 KB | Source Code | 0 0
  1. Nginx Block:
  2.  
  3. server {
  4. listen 80;
  5. listen [::]:80;
  6. server_name domain.click www.domain.click;
  7. return 301 https://$host$request_uri;
  8. }
  9.  
  10. server {
  11. listen 443 ssl http2 ;
  12. listen [::]:443 ssl http2 ipv6only=on;
  13. server_name domain.click www.domain.click;
  14.  
  15. ssl_certificate /etc/ssl/certificate.pem;
  16. ssl_certificate_key /etc/ssl/private.key;
  17. ssl_protocols TLSv1.2 TLSv1.3;
  18. ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305;
  19. ssl_prefer_server_ciphers off;
  20. ssl_session_cache shared:SSL:50m;
  21. ssl_session_timeout 1d;
  22.  
  23. allow 103.21.244.0/22;
  24. allow 103.22.200.0/22;
  25. allow 103.31.4.0/22;
  26. allow 104.16.0.0/13;
  27. allow 104.24.0.0/14;
  28. allow 108.162.192.0/18;
  29. allow 131.0.72.0/22;
  30. allow 141.101.64.0/18;
  31. allow 162.158.0.0/15;
  32. allow 172.64.0.0/13;
  33. allow 173.245.48.0/20;
  34. allow 188.114.96.0/20;
  35. allow 190.93.240.0/20;
  36. allow 197.234.240.0/22;
  37. allow 198.41.128.0/17;
  38. allow 2400:cb00::/32;
  39. allow 2606:4700::/32;
  40. allow 2803:f800::/32;
  41. allow 2405:b500::/32;
  42. allow 2405:8100::/32;
  43. allow 2a06:98c0::/29;
  44. allow 2c0f:f248::/32;
  45. deny all;
  46.  
  47. location / {
  48. root /var/www/html;
  49. index index.html index.htm index.nginx-debian.html;
  50. }
  51.  
  52. location /v2ray {
  53. if ($http_upgrade != "websocket") {
  54. return 404;
  55. }
  56. proxy_redirect off;
  57. proxy_pass http://127.0.0.1:10000;
  58. proxy_http_version 1.1;
  59. proxy_set_header Upgrade $http_upgrade;
  60. proxy_set_header Connection "upgrade";
  61. proxy_set_header Host $host;
  62. proxy_set_header X-Real-IP $remote_addr;
  63. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  64. proxy_set_header X-Forwarded-Proto $scheme;
  65. proxy_set_header CF-Connecting-IP $http_cf_connecting_ip;
  66. proxy_set_header CF-RAY $http_cf_ray;
  67. proxy_set_header CF-Visitor $http_cf_visitor;
  68. }
  69. }
  70.  
  71.  
  72.  
  73. ###################################################################################################
  74. V2ray Proxy Server Config:
  75.  
  76. {
  77. "log": {
  78. "access": "/var/log/v2ray/access.log",
  79. "error": "/var/log/v2ray/error.log",
  80. "loglevel": "warning"
  81. },
  82. "inbounds": [
  83. {
  84. "listen": "127.0.0.1",
  85. "port": 10000,
  86. "protocol": "vless",
  87. "settings": {
  88. "clients": [
  89. {
  90. "id": "a9955fad-xxxx-437c-8ad3-9491de364045",
  91. "level": 1,
  92. "alterId": 0
  93. }
  94. ],
  95. "decryption": "none"
  96. },
  97. "streamSettings": {
  98. "network": "ws",
  99. "wsSettings": {
  100. "path": "/v2ray"
  101. }
  102. },
  103. "sniffing": {
  104. "enabled": true,
  105. "destOverride": [
  106. "http",
  107. "tls",
  108. "quic"
  109. ]
  110. }
  111. }
  112. ],
  113. "outbounds": [
  114. {
  115. "protocol": "freedom",
  116. "settings": {
  117. "domainStrategy": "UseIP"
  118. },
  119. "tag": "direct"
  120. },
  121. {
  122. "protocol": "freedom",
  123. "settings": {
  124. "domainStrategy": "UseIPv4"
  125. },
  126. "tag": "force-ipv4"
  127. },
  128. {
  129. "protocol": "freedom",
  130. "settings": {
  131. "domainStrategy": "UseIPv6"
  132. },
  133. "tag": "force-ipv6"
  134. },
  135. {
  136. "protocol": "socks",
  137. "settings": {
  138. "servers": [
  139. {
  140. "address": "127.0.0.1",
  141. "port": 40000
  142. }
  143. ]
  144. },
  145. "tag": "socks5-warp"
  146. },
  147. {
  148. "protocol": "blackhole",
  149. "settings": {},
  150. "tag": "blocked"
  151. }
  152. ],
  153. "dns": {
  154. "servers": [
  155. "https+local://1.1.1.1/dns-query",
  156. "https+local://8.8.8.8/dns-query",
  157. "1.1.1.1",
  158. "8.8.8.8",
  159. "1.0.0.1",
  160. "8.8.4.4",
  161. "localhost"
  162. ]
  163. },
  164. "routing": {
  165. "domainStrategy": "IPOnDemand",
  166. "rules": [
  167. {
  168. "type": "field",
  169. "port": 22,
  170. "outboundTag": "direct"
  171. },
  172. {
  173. "type": "field",
  174. "ip": [
  175. "0.0.0.0/8",
  176. "10.0.0.0/8",
  177. "100.64.0.0/10",
  178. "127.0.0.0/8",
  179. "169.254.0.0/16",
  180. "172.16.0.0/12",
  181. "192.0.0.0/24",
  182. "192.0.2.0/24",
  183. "192.168.0.0/16",
  184. "198.18.0.0/15",
  185. "198.51.100.0/24",
  186. "203.0.113.0/24",
  187. "::1/128",
  188. "fc00::/7",
  189. "fe80::/10"
  190. ],
  191. "outboundTag": "blocked"
  192. },
  193. {
  194. "type": "field",
  195. "network": "tcp,udp",
  196. "outboundTag": "socks5-warp"
  197. }
  198. ]
  199. }
  200. }
  201.  
  202.  
  203.  
  204. ###################################################################################
  205. Singbox Client Connection Config:
  206.  
  207. {
  208. "log": {
  209. "disabled": false,
  210. "level": "warning",
  211. "output": "",
  212. "timestamp": false
  213. },
  214. "experimental": {
  215. "clash_api": {
  216. "external_controller": "127.0.0.1:20123",
  217. "external_ui": "",
  218. "external_ui_download_url": "",
  219. "external_ui_download_detour": "🎯 Direct",
  220. "secret": "ID_b6r0wfyp",
  221. "default_mode": "rule",
  222. "access_control_allow_origin": [
  223. "*"
  224. ],
  225. "access_control_allow_private_network": false
  226. },
  227. "cache_file": {
  228. "enabled": true,
  229. "path": "cache.db",
  230. "cache_id": "",
  231. "store_fakeip": true,
  232. "store_rdrc": true,
  233. "rdrc_timeout": "7d"
  234. }
  235. },
  236. "inbounds": [
  237. {
  238. "type": "mixed",
  239. "tag": "mixed-in",
  240. "listen": "127.0.0.1",
  241. "listen_port": 20122,
  242. "tcp_fast_open": false,
  243. "tcp_multi_path": false,
  244. "udp_fragment": false
  245. },
  246. {
  247. "type": "tun",
  248. "tag": "tun-in",
  249. "interface_name": "",
  250. "address": [
  251. "172.18.0.1/30",
  252. "fdfe:dcba:9876::1/126"
  253. ],
  254. "mtu": 1500,
  255. "auto_route": true,
  256. "strict_route": true,
  257. "endpoint_independent_nat": false,
  258. "stack": "mixed"
  259. }
  260. ],
  261. "outbounds": [
  262. {
  263. "type": "selector",
  264. "tag": "🚀 Select",
  265. "interrupt_exist_connections": true,
  266. "outbounds": [
  267. "🎈 Auto",
  268. "USA"
  269. ]
  270. },
  271. {
  272. "type": "urltest",
  273. "tag": "🎈 Auto",
  274. "url": "https://www.gstatic.com/generate_204",
  275. "interval": "3m",
  276. "tolerance": 150,
  277. "interrupt_exist_connections": true,
  278. "outbounds": [
  279. "USA"
  280. ]
  281. },
  282. {
  283. "type": "direct",
  284. "tag": "🎯 Direct"
  285. },
  286. {
  287. "type": "selector",
  288. "tag": "🐟 Fallback",
  289. "interrupt_exist_connections": true,
  290. "outbounds": [
  291. "🚀 Select",
  292. "🎯 Direct",
  293. "USA"
  294. ]
  295. },
  296. {
  297. "type": "selector",
  298. "tag": "GLOBAL",
  299. "interrupt_exist_connections": true,
  300. "outbounds": [
  301. "🚀 Select",
  302. "🎈 Auto",
  303. "🎯 Direct",
  304. "🐟 Fallback",
  305. "USA"
  306. ]
  307. },
  308. {
  309. "tag": "USA",
  310. "type": "vless",
  311. "server": "domain.click",
  312. "server_port": 443,
  313. "uuid": "ce798037-xxxx-48b4-985d-eb51d7193965",
  314. "tls": {
  315. "enabled": true,
  316. "server_name": "domain.click",
  317. "insecure": false
  318. },
  319. "transport": {
  320. "type": "ws",
  321. "headers": {},
  322. "path": "/v2ray"
  323. }
  324. }
  325. ],
  326. "route": {
  327. "rules": [
  328. {
  329. "action": "sniff",
  330. "inbound": "tun-in"
  331. },
  332. {
  333. "action": "hijack-dns",
  334. "protocol": "dns"
  335. },
  336. {
  337. "action": "route",
  338. "clash_mode": "direct",
  339. "outbound": "🎯 Direct"
  340. },
  341. {
  342. "action": "route",
  343. "clash_mode": "global",
  344. "outbound": "GLOBAL"
  345. },
  346. {
  347. "action": "reject",
  348. "protocol": "quic"
  349. },
  350. {
  351. "action": "reject",
  352. "rule_set": [
  353. "Category-Ads"
  354. ]
  355. },
  356. {
  357. "action": "reject",
  358. "rule_set": [
  359. "GeoSite-Private"
  360. ]
  361. },
  362. {
  363. "action": "reject",
  364. "rule_set": [
  365. "GeoIP-Private"
  366. ]
  367. }
  368. ],
  369. "rule_set": [
  370. {
  371. "tag": "Category-Ads",
  372. "type": "remote",
  373. "url": "https://testingcf.jsdelivr.net/gh/MetaCubeX/meta-rules-dat@sing/geo/geosite/category-ads-all.srs",
  374. "format": "binary",
  375. "download_detour": "🎯 Direct"
  376. },
  377. {
  378. "tag": "GeoIP-Private",
  379. "type": "remote",
  380. "url": "https://testingcf.jsdelivr.net/gh/MetaCubeX/meta-rules-dat@sing/geo/geoip/private.srs",
  381. "format": "binary",
  382. "download_detour": "🎯 Direct"
  383. },
  384. {
  385. "tag": "GeoSite-Private",
  386. "type": "remote",
  387. "url": "https://testingcf.jsdelivr.net/gh/MetaCubeX/meta-rules-dat@sing/geo/geosite/private.srs",
  388. "format": "binary",
  389. "download_detour": "🎯 Direct"
  390. }
  391. ],
  392. "auto_detect_interface": true,
  393. "final": "🐟 Fallback"
  394. },
  395. "dns": {
  396. "servers": [
  397. {
  398. "tag": "Local-Bootstrap-DNS",
  399. "address": "https://1.1.1.1/dns-query",
  400. "address_resolver": "Local-DNS-Resolver",
  401. "detour": "🎯 Direct"
  402. },
  403. {
  404. "tag": "Local-DNS-Resolver",
  405. "address": "1.1.1.1",
  406. "detour": "🎯 Direct"
  407. },
  408. {
  409. "tag": "Remote-DNS",
  410. "address": "tls://1.1.1.1",
  411. "address_resolver": "Local-DNS-Resolver",
  412. "detour": "🚀 Select"
  413. }
  414. ],
  415. "rules": [
  416. {
  417. "action": "route",
  418. "server": "Local-Bootstrap-DNS",
  419. "domain": ["domain.click"]
  420. },
  421. {
  422. "action": "route",
  423. "server": "Local-DNS",
  424. "clash_mode": "direct"
  425. },
  426. {
  427. "action": "route",
  428. "server": "Remote-DNS",
  429. "clash_mode": "global"
  430. }
  431. ],
  432. "fakeip": {
  433. "enabled": false,
  434. "inet4_range": "198.18.0.0/15",
  435. "inet6_range": "fc00::/18"
  436. },
  437. "disable_cache": false,
  438. "disable_expire": false,
  439. "independent_cache": false,
  440. "final": "Remote-DNS",
  441. "strategy": "ipv4_only"
  442. }
  443. }
  444.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement