wg2nssurge
v1.0.0
Published
Convert WireGuard config files into NSSurge config
Readme
WG2NSSurge
A simple tool to convert your wireguard config into nssurge config
Usage
$ npm install -g wg2nssurge
$ wg2nssurge <wg-config> <name>Example output
[WireGuard 19F85109]
private-key = <PRIVATE-KEY>
mtu = 1320
dns-server = <DNS>
prefer-ipv6 = true
peer = (public-key = "<PUBKEY>", allowed-ips = "0.0.0.0/0,::/0", endpoint = "<ENDPOINT>", preshared-key = "<PSK>", keepalive = "15")
self-ip = <IP>
self-ip-v6 = <IP6>
AAAAA = wireguard, section-name=19F85109To use generated config, copy the first part into the end of your surge config file,
and then copy the last part (AAAAA = wireguard, section-name=19F85109) to [Proxy] section. Example below
[Proxy]
AAAAA = wireguard, section-name=19F85109
[WireGuard 19F85109]
private-key = <PRIVATE-KEY>
mtu = 1320
dns-server = <DNS>
prefer-ipv6 = true
peer = (public-key = "<PUBKEY>", allowed-ips = "0.0.0.0/0,::/0", endpoint = "<ENDPOINT>", preshared-key = "<PSK>", keepalive = "15")
self-ip = <IP>
self-ip-v6 = <IP6>