Thanks to visit codestin.com
Credit goes to github.com

Skip to content

ilhamabdlh/vpn-tun

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vpn-tun

under construction

  • 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.

Topology

topology

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.

usage

  • 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)

Server

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",

home

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

client

and then, you can see in "127.0.0.1:30001/register/list/ip", those are some clients that have been connected by server.

list_user

TODO:

  • 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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages