Qilan2 commited on
Commit
4def550
·
verified ·
1 Parent(s): 20e93e9

Update sbx/a/app.py

Browse files
Files changed (1) hide show
  1. sbx/a/app.py +127 -1
sbx/a/app.py CHANGED
@@ -293,7 +293,133 @@ uuid: {UUID}"""
293
  f.write(config_yaml)
294
 
295
  # Generate configuration file
296
- config ={"log":{"access":"/dev/null","error":"/dev/null","loglevel":"none",},"inbounds":[{"port":ARGO_PORT ,"protocol":"vless","settings":{"clients":[{"id":UUID ,"flow":"xtls-rprx-vision",},],"decryption":"none","fallbacks":[{"dest":3001 },{"path":"/vless-argo","dest":3002 },{"path":"/vmess-argo","dest":3003 },{"path":"/trojan-argo","dest":3004 },],},"streamSettings":{"network":"tcp",},},{"port":3001 ,"listen":"127.0.0.1","protocol":"vless","settings":{"clients":[{"id":UUID },],"decryption":"none"},"streamSettings":{"network":"ws","security":"none"}},{"port":3002 ,"listen":"127.0.0.1","protocol":"vless","settings":{"clients":[{"id":UUID ,"level":0 }],"decryption":"none"},"streamSettings":{"network":"ws","security":"none","wsSettings":{"path":"/vless-argo"}},"sniffing":{"enabled":True ,"destOverride":["http","tls","quic"],"metadataOnly":False }},{"port":3003 ,"listen":"127.0.0.1","protocol":"vmess","settings":{"clients":[{"id":UUID ,"alterId":0 }]},"streamSettings":{"network":"ws","wsSettings":{"path":"/vmess-argo"}},"sniffing":{"enabled":True ,"destOverride":["http","tls","quic"],"metadataOnly":False }},{"port":3004 ,"listen":"127.0.0.1","protocol":"trojan","settings":{"clients":[{"password":UUID },]},"streamSettings":{"network":"ws","security":"none","wsSettings":{"path":"/trojan-argo"}},"sniffing":{"enabled":True ,"destOverride":["http","tls","quic"],"metadataOnly":False }},],"outbounds":[{"protocol":"freedom","tag": "direct" },{"protocol":"blackhole","tag":"block"}]}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
297
  with open(os.path.join(FILE_PATH, 'config.json'), 'w', encoding='utf-8') as config_file:
298
  json.dump(config, config_file, ensure_ascii=False, indent=2)
299
 
 
293
  f.write(config_yaml)
294
 
295
  # Generate configuration file
296
+ # config ={"log":{"access":"/dev/null","error":"/dev/null","loglevel":"none",},"inbounds":[{"port":ARGO_PORT ,"protocol":"vless","settings":{"clients":[{"id":UUID ,"flow":"xtls-rprx-vision",},],"decryption":"none","fallbacks":[{"dest":3001 },{"path":"/vless-argo","dest":3002 },{"path":"/vmess-argo","dest":3003 },{"path":"/trojan-argo","dest":3004 },],},"streamSettings":{"network":"tcp",},},{"port":3001 ,"listen":"127.0.0.1","protocol":"vless","settings":{"clients":[{"id":UUID },],"decryption":"none"},"streamSettings":{"network":"ws","security":"none"}},{"port":3002 ,"listen":"127.0.0.1","protocol":"vless","settings":{"clients":[{"id":UUID ,"level":0 }],"decryption":"none"},"streamSettings":{"network":"ws","security":"none","wsSettings":{"path":"/vless-argo"}},"sniffing":{"enabled":True ,"destOverride":["http","tls","quic"],"metadataOnly":False }},{"port":3003 ,"listen":"127.0.0.1","protocol":"vmess","settings":{"clients":[{"id":UUID ,"alterId":0 }]},"streamSettings":{"network":"ws","wsSettings":{"path":"/vmess-argo"}},"sniffing":{"enabled":True ,"destOverride":["http","tls","quic"],"metadataOnly":False }},{"port":3004 ,"listen":"127.0.0.1","protocol":"trojan","settings":{"clients":[{"password":UUID },]},"streamSettings":{"network":"ws","security":"none","wsSettings":{"path":"/trojan-argo"}},"sniffing":{"enabled":True ,"destOverride":["http","tls","quic"],"metadataOnly":False }},],"outbounds":[{"protocol":"freedom","tag": "direct" },{"protocol":"blackhole","tag":"block"}]}
297
+ config = {
298
+ "log": {
299
+ "access": "/dev/null",
300
+ "error": "/dev/null",
301
+ "loglevel": "none"
302
+ },
303
+ "inbounds": [
304
+ {
305
+ "port": ARGO_PORT,
306
+ "protocol": "vless",
307
+ "settings": {
308
+ "clients": [{"id": UUID, "flow": "xtls-rprx-vision"}],
309
+ "decryption": "none",
310
+ "fallbacks": [
311
+ {"dest": 3001},
312
+ {"path": "/vless-argo", "dest": 3002},
313
+ {"path": "/vmess-argo", "dest": 3003},
314
+ {"path": "/trojan-argo", "dest": 3004}
315
+ ]
316
+ },
317
+ "streamSettings": {"network": "tcp"}
318
+ },
319
+ {
320
+ "port": 3001,
321
+ "listen": "127.0.0.1",
322
+ "protocol": "vless",
323
+ "settings": {
324
+ "clients": [{"id": UUID}],
325
+ "decryption": "none"
326
+ },
327
+ "streamSettings": {"network": "ws", "security": "none"}
328
+ },
329
+ {
330
+ "port": 3002,
331
+ "listen": "127.0.0.1",
332
+ "protocol": "vless",
333
+ "settings": {
334
+ "clients": [{"id": UUID, "level": 0}],
335
+ "decryption": "none"
336
+ },
337
+ "streamSettings": {
338
+ "network": "ws",
339
+ "security": "none",
340
+ "wsSettings": {"path": "/vless-argo"}
341
+ },
342
+ "sniffing": {
343
+ "enabled": True,
344
+ "destOverride": ["http", "tls", "quic"],
345
+ "metadataOnly": False
346
+ }
347
+ },
348
+ {
349
+ "port": 3003,
350
+ "listen": "127.0.0.1",
351
+ "protocol": "vmess",
352
+ "settings": {
353
+ "clients": [{"id": UUID, "alterId": 0}]
354
+ },
355
+ "streamSettings": {
356
+ "network": "ws",
357
+ "wsSettings": {"path": "/vmess-argo"}
358
+ },
359
+ "sniffing": {
360
+ "enabled": True,
361
+ "destOverride": ["http", "tls", "quic"],
362
+ "metadataOnly": False
363
+ }
364
+ },
365
+ {
366
+ "port": 3004,
367
+ "listen": "127.0.0.1",
368
+ "protocol": "trojan",
369
+ "settings": {
370
+ "clients": [{"password": UUID}]
371
+ },
372
+ "streamSettings": {
373
+ "network": "ws",
374
+ "security": "none",
375
+ "wsSettings": {"path": "/trojan-argo"}
376
+ },
377
+ "sniffing": {
378
+ "enabled": True,
379
+ "destOverride": ["http", "tls", "quic"],
380
+ "metadataOnly": False
381
+ }
382
+ }
383
+ ],
384
+ "outbounds": [
385
+ {"protocol": "freedom", "tag": "direct"},
386
+ {
387
+ "protocol": "vmess",
388
+ "tag": "youtube",
389
+ "settings": {
390
+ "vnext": [{
391
+ "address": "172.233.171.224",
392
+ "port": 16416,
393
+ "users": [{
394
+ "id": "8c1b9bea-cb51-43bb-a65c-0af31bbbf145",
395
+ "alterId": 0
396
+ }]
397
+ }]
398
+ },
399
+ "streamSettings": {"network": "tcp"}
400
+ },
401
+ {"protocol": "blackhole", "tag": "block"}
402
+ ],
403
+ "routing": {
404
+ "domainStrategy": "IPIfNonMatch",
405
+ "rules": [
406
+ {
407
+ "type": "field",
408
+ "domain": [
409
+ "youtube.com",
410
+ "youtu.be",
411
+ "googlevideo.com",
412
+ "ytimg.com",
413
+ "gstatic.com",
414
+ "googleapis.com",
415
+ "ggpht.com",
416
+ "googleusercontent.com"
417
+ ],
418
+ "outboundTag": "youtube"
419
+ }
420
+ ]
421
+ }
422
+ }
423
  with open(os.path.join(FILE_PATH, 'config.json'), 'w', encoding='utf-8') as config_file:
424
  json.dump(config, config_file, ensure_ascii=False, indent=2)
425