mirror of
https://github.com/lucheng0127/virtuallan.git
synced 2025-12-24 13:17:50 +08:00
For MacOS, it only support tun. If use tun than tap, server should recode ip of each endpoint. And parse ipv4 header from net connection, and forword packet according to ipv4 header dst ip. If dst ip included by vpn cidr cheack the endpoint and forward to it. If dst ip included by vpn cidr but no recode of endpoint, drop it do nothing. If dst ip not included by vpn cidr, send it to server tun interface, it will forword by server according to routes and iptables rules.
48 lines
1.8 KiB
Modula-2
48 lines
1.8 KiB
Modula-2
module github.com/lucheng0127/virtuallan
|
|
|
|
go 1.20
|
|
|
|
require (
|
|
bou.ke/monkey v1.0.2
|
|
github.com/creasty/defaults v1.7.0
|
|
github.com/erikdubbelboer/gspt v0.0.0-20210805194459-ce36a5128377
|
|
github.com/gin-gonic/gin v1.9.1
|
|
github.com/go-playground/validator/v10 v10.14.0
|
|
github.com/sirupsen/logrus v1.9.3
|
|
github.com/songgao/water v0.0.0-20200317203138-2b4b6d7c09d8
|
|
github.com/urfave/cli/v2 v2.27.1
|
|
github.com/vishvananda/netlink v1.1.0
|
|
golang.org/x/net v0.10.0
|
|
golang.org/x/sync v0.7.0
|
|
golang.org/x/sys v0.19.0
|
|
golang.org/x/term v0.19.0
|
|
gopkg.in/yaml.v3 v3.0.1
|
|
)
|
|
|
|
require (
|
|
github.com/bytedance/sonic v1.9.1 // indirect
|
|
github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 // indirect
|
|
github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect
|
|
github.com/gabriel-vasile/mimetype v1.4.2 // indirect
|
|
github.com/gin-contrib/sse v0.1.0 // indirect
|
|
github.com/go-playground/locales v0.14.1 // indirect
|
|
github.com/go-playground/universal-translator v0.18.1 // indirect
|
|
github.com/goccy/go-json v0.10.2 // indirect
|
|
github.com/json-iterator/go v1.1.12 // indirect
|
|
github.com/klauspost/cpuid/v2 v2.2.4 // indirect
|
|
github.com/leodido/go-urn v1.2.4 // indirect
|
|
github.com/mattn/go-isatty v0.0.19 // indirect
|
|
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
|
|
github.com/modern-go/reflect2 v1.0.2 // indirect
|
|
github.com/pelletier/go-toml/v2 v2.0.8 // indirect
|
|
github.com/russross/blackfriday/v2 v2.1.0 // indirect
|
|
github.com/twitchyliquid64/golang-asm v0.15.1 // indirect
|
|
github.com/ugorji/go/codec v1.2.11 // indirect
|
|
github.com/vishvananda/netns v0.0.0-20191106174202-0a2b9b5464df // indirect
|
|
github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 // indirect
|
|
golang.org/x/arch v0.3.0 // indirect
|
|
golang.org/x/crypto v0.9.0 // indirect
|
|
golang.org/x/text v0.9.0 // indirect
|
|
google.golang.org/protobuf v1.30.0 // indirect
|
|
)
|