Open linnuxx opened 5 months ago
In order to forward the traffic of wireguard to kcptube, the WireGuard listening address and communication address should both point to the kcptube forwarding port on the local machine.
Assume that home pc is client and 'ipvds' is server, wireguard and kcptube are running on the same machine. If so, please modify the configureations as below:
wgclient:[Interface] PrivateKey = key
Address = 192.168.168.10/24 MTU = 1300
[Peer] PublicKey = key AllowedIPs = 192.168.168.9/24
Endpoint = 127.0.0.1:51820 PersistentKeepalive = 20
wgserver: [Interface] PrivateKey = key ListenPort = 51820 Address = 192.168.168.9/24 MTU = 1300 [Peer] PublicKey = key AllowedIPs = 192.168.168.10/24 AllowedIPs = 192.168.0.10/24 AllowedIPs = 192.168.0.0/24 AllowedIPs = 192.168.1.0/24
PersistentKeepalive = 20
homepc:
mode=client kcp=regular3 inbound_bandwidth=1G outbound_bandwidth=1G
listen_port=51820
destination_port=59000 destination_address=ipvds encryption_password=qwerty1234 encryption_algorithm=AES-GCM
vds:
mode=server kcp=regular3 inbound_bandwidth=500M outbound_bandwidth=50M listen_port=59000
destination_port=51820
destination_address=127.0.0.1 encryption_password=qwerty1234 encryption_algorithm=AES-GCM
graph LR;
wgclient["wgclient, connect to 127.0.0.1:51820"]-->local["kcptube (client), listen on 51820, connect to rempte:59000"];
local-->remote["kcptube (server), listen on 59000, connect to wgserver"];
remote-->wgserver["wgserver, listen on 51820"];
wireguard and kcptube
wireguard and kcptube - works on different external IP addresses, so there is no access over the local network.
Is #21 the new configuration settings?
If so, the wireguard connection is connected directly via internet. No traffic is forwarded by kcptube.
.