Giter Club home page Giter Club logo

vptun-server's Introduction

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)

vptun-server's People

Contributors

lian-yue avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.