cmd/httpagent: toggle KCP/TCP
This commit is contained in:
parent
f09a33e0df
commit
cc890642b6
|
@ -13,7 +13,8 @@ var (
|
||||||
token = flag.String("token", "", "Service identifier token")
|
token = flag.String("token", "", "Service identifier token")
|
||||||
domain = flag.String("domain", "", "Domain to ID as")
|
domain = flag.String("domain", "", "Domain to ID as")
|
||||||
backend = flag.String("backend", "http://127.0.0.1:9090", "backend TCP/HTTP server")
|
backend = flag.String("backend", "http://127.0.0.1:9090", "backend TCP/HTTP server")
|
||||||
serverAddr = flag.String("server", "127.0.0.1:9234", "frontend KCP server")
|
serverAddr = flag.String("server", "127.0.0.1:9234", "frontend server")
|
||||||
|
connMethod = flag.String("method", "tcp", "tcp or kcp connections?")
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
@ -21,7 +22,7 @@ func main() {
|
||||||
|
|
||||||
cfg := &tun2.ClientConfig{
|
cfg := &tun2.ClientConfig{
|
||||||
TLSConfig: &tls.Config{},
|
TLSConfig: &tls.Config{},
|
||||||
ConnType: "tcp",
|
ConnType: *connMethod,
|
||||||
ServerAddr: *serverAddr,
|
ServerAddr: *serverAddr,
|
||||||
Token: *token,
|
Token: *token,
|
||||||
Domain: *domain,
|
Domain: *domain,
|
||||||
|
|
Loading…
Reference in New Issue