initial commit

This commit is contained in:
kai
2026-03-31 18:18:35 +08:00
commit 97c48995b1
36 changed files with 5985 additions and 0 deletions
+42
View File
@@ -0,0 +1,42 @@
import platform, os, gzip, urllib.request, json
import yaml
def gen_config(proxy, local_port):
cfg = {
"port": 0,
"socks-port": local_port,
"mode": "Global",
"proxies": [{
"name": proxy["name"],
"type": "ss",
"server": proxy["host"],
"port": proxy["port"],
"cipher": proxy["method"],
"password": proxy["password"],
"plugin": "obfs",
"plugin-opts": {
"mode": proxy["obfs"],
"host": proxy["obfs_host"]
}
}],
"proxy-groups": [{
"name": "Proxy",
"type": "select",
"proxies": [proxy["name"]]
}],
"rules": [
"MATCH,Proxy"
]
}
return yaml.dump(cfg)
proxy_test = {
"name": "HK 01",
"host": "d32b6cd.gylcxo.xyz",
"port": 18300,
"method": "aes-128-gcm",
"password": "ced",
"obfs": "http",
"obfs_host": "Sm0lO349ch.microsoft.com"
}
print(gen_config(proxy_test, 10800))