- VPN Tunnel is almost built here, after telnet, I try to build a VPN network with same specs as Telent. i.e. having 1 server to control the clients, and each client must be connected to server so that they can communicate with each other. i use the library "github.com/songgao/water" for build tunnel.
Im trying to build a network with VPN Tunnel, let's look the topology, there is a server is the control for networks that will communicate. In topology, I set PC B as a server to control the connection between clients. Then, and I set PC C to be Client1, I liken PC C to Atop device. and I set PC A to be Client2, as a User who want to access the device.
- first type in the command prompt "PC B" as a server.
go run main.go -s -l=:3001 -c=192.168.254.169/24 -k=123456- "-s" flag for server,
- "-l" http port
- "-c" vpn ip and port
- "-k" key (must be the same on server and client)
above is a description of server, on port 3001 is the port to open an http network. can be directly seen on "127.0.0.1:3001",
next, we will make a connection between the client and server. type:
go run main.go -l=:3000 -s=server-addr:3001 -c=172.16.0.10/24 -k=123456
and then, you can see in "127.0.0.1:30001/register/list/ip", those are some clients that have been connected by server.
- cant communicate with each other between clients
- do handshake with a more secure key
- create a room so that intended user and device can communicate with each other
- deploy servers to cloud, they can be used on different networks