Skip to content

otamoe/vptun-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Run

1. Generate a certificate

git clone [email protected]:otamoe/vptun-certificate.git
cd vptun-certificate
go build
./vptun-certificate

2. Run server

git clone [email protected]:otamoe/vptun-server.git
cd vptun-server
go build
./vptun-server

management address

https://127.0.0.1:8443

Username Default: admin

The password is randomly generated by default in the output log

{"level":"info","ts":"2022-05-10T21:19:37.291+0800","logger":"server","caller":"server/http_handler.go:175","msg":"http.login","username":"admin","password":"xxxxxx"}

3. Run client

git clone [email protected]:otamoe/vptun-client.git
cd vptun-client
go build
./vptun-client --grpc.targetaddress=127.0.0.1:9443

3. Run client

git clone [email protected]:otamoe/vptun-client.git
cd vptun-client
go build
sudo ./vptun-client --grpc.targetaddress=127.0.0.1:9443

Help

vptun-certificate

https://github.com/otamoe/vptun-certificate

vptun-certificate: go run main.go --help
      --env string         Environment type  production, development, test (default "production")
      --grpc.bits int       Bits of certificate issued by grpc (default 4096)
      --grpc.type string   Type of certificate issued by grpc (default "rsa")
      --help               print help
      --http.bits int       Bits of certificate issued by http (default 4096)
      --http.host string   Host of certificate issued by http (default "localhost")
      --http.type string   Type of certificate issued by http (default "rsa")
      --output string      output dir (default "/Users/lianyue/.vptun")

vptun-server help

https://github.com/otamoe/vptun-server

vptun-server: go run main.go --help
      --badger.blockcachesize int             Badger block cache size (default 536870912)
      --badger.indexcachesize int             Badger index cache size (default 536870912)
      --badger.indexdir string                Badger index dir (default "/Users/lianyue/.vptun/server/badger/index")
      --badger.memtablesize int               Badger mem table size (default 268435456)
      --badger.valuedir string                Badger value dir (default "/Users/lianyue/.vptun/server/badger/value")
      --env string                            Environment type  production, development, test (default "production")
      --grpc.connectiontimeout duration       Connection timeout (default 30s)
      --grpc.listenaddress string             Listen address (default ":9443")
      --grpc.maxconcurrentstreams uint32      Max concurrent streams (default 64)
      --grpc.maxconnectionage duration        Max connection age
      --grpc.maxconnectionagegrace duration   Max connection age grace (default 5s)
      --grpc.maxconnectionidle duration       Max connection idle (default 6m0s)
      --grpc.time duration                    Ping interval (default 5m0s)
      --grpc.timeout duration                 Ping timeout (default 20s)
      --grpc.tlsca string                     Certification authority (default "/Users/lianyue/.vptun/server/grpc/ca.crt")
      --grpc.tlscrt string                    Credentials (default "/Users/lianyue/.vptun/server/grpc/server.crt")
      --grpc.tlskey string                    Private key (default "/Users/lianyue/.vptun/server/grpc/server.key")
      --help                                  print help
      --http.listenaddress string             HTTP listen address (default ":8443")
      --http.password string                  Admin password
      --http.public string                    public file directory (default "/Users/lianyue/.vptun/public")
      --http.tlsca string                     Certification authority (default "/Users/lianyue/.vptun/server/http/ca.crt")
      --http.tlscrt string                    Credentials (default "/Users/lianyue/.vptun/server/http/server.crt")
      --http.tlskey string                    Private key (default "/Users/lianyue/.vptun/server/http/server.key")
      --http.username string                  Admin username (default "admin")
      --logger.level strings                  logger level
      --logger.write.compress                 logger write max compress
      --logger.write.filename string          logger write path
      --logger.write.maxage                   logger write max max age
      --logger.write.maxbackups int           logger write max backups (default 32)
      --logger.write.maxsize int              logger write max size  mb (default 4)
      --route.create ipNet                    Subnet for auto-registered clients (default 10.255.0.0/16)
      --route.subnet ipNet                    Subnet of the entire router (default 10.128.0.0/9)

vptun-client help

https://github.com/otamoe/vptun-client

vptun-client: go run main.go --help
      --env string                     Environment type  production, development, test (default "production")
      --grpc.clientid string           Client id
      --grpc.clientkey string          Client key
      --grpc.dialtimeout duration      Dial timeout (default 1m0s)
      --grpc.retryinterval duration    Retry interval (default 1m0s)
      --grpc.shell                     Execute shell commands
      --grpc.status duration           Upload status interval
      --grpc.targetaddress string      Dial address (default "127.0.0.1:9443")
      --grpc.time duration             Ping interval (default 3m0s)
      --grpc.timeout duration          Ping timeout (default 30s)
      --grpc.tlsca string              Certification authority (default "/Users/lianyue/.vptun/client/grpc/ca.crt")
      --grpc.tlscrt string             Credentials (default "/Users/lianyue/.vptun/client/grpc/client.crt")
      --grpc.tlskey string             Private key (default "/Users/lianyue/.vptun/client/grpc/client.key")
      --help                           print help
      --logger.level strings           logger level
      --logger.write.compress          logger write max compress
      --logger.write.filename string   logger write path
      --logger.write.maxage            logger write max max age
      --logger.write.maxbackups int    logger write max backups (default 32)
      --logger.write.maxsize int       logger write max size  mb (default 4)