Skip to content

crazyhulk/tun

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tun

This is an easy VPN server example by golang. It support Tun interface only.

+---------------+               +---------------+
|               |               |               |
|               |               |               |
+-------+-------+               +-------^-------+
        |                               |
+-------v-------+  works here   +-------+-------+
|Network Layer  <---------------+Network Layer  |
|Tun Interface  +--------------->Tun Interface  |
+-------+-------+               +-------^-------+
        |                               |
+-------v-------+               +-------+-------+
|Data Link Layer|               |Data Link Layer|
|Tap Interface  |               |Tap Interface  |
+-------+-------+               +-------^-------+
        |                               |
+-------v-------+               +-------+-------+
|Physical Layer |               |Physical Layer |
|               |               |               |
+-------+-------+               +-------^-------+
        |                               |
        +-------------------------------+

Clients.

How to use?

Config your vpn.json first.

Enjoy yourself!

Must open ip_forwarding = 1

iptables -t nat -A POSTROUTING -j MASQUERADE

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages