Skip to content

Commit d964ffe

Browse files
authored
Merge pull request #26 from MikeKoroban/fix-wg-address
Fix missing WireGuard local interface address in sing-box subscription JSON for Hiddify clients.
2 parents d3b78d3 + 7e26629 commit d964ffe

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

hiddifypanel/hutils/proxy/singbox.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -381,6 +381,7 @@ def add_wireguard(base: dict, proxy: dict):
381381

382382
base["private_key"] = proxy["wg_pk"]
383383
base["mtu"] = 1380
384+
base["address"] = [f'{proxy["wg_ipv4"]}/32']
384385
base['peers']=[{
385386
"public_key":proxy["wg_server_pub"],
386387
"pre_shared_key":proxy["wg_psk"],
@@ -389,7 +390,6 @@ def add_wireguard(base: dict, proxy: dict):
389390
"allowed_ips": [
390391
"0.0.0.0/0","::/0"
391392
]
392-
# "address" : f'{proxy["wg_ipv4"]}/32'
393393
}]
394394
del base["server_port"]
395395
del base["server"]

hiddifypanel/hutils/proxy/xray.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ def to_link(proxy: dict) -> str | dict:
155155
"publicKey": proxy["wg_server_pub"],
156156
"presharedKey": proxy["wg_psk"],
157157
"reserved": "0,0,0",
158-
"ip":"10.0.0.1",
158+
"ip":f'{proxy["wg_ipv4"]}/32',
159159
"mtu":"1380",
160160
"keepalive":"30",
161161
"udp":1,

0 commit comments

Comments
 (0)