mirror of
https://github.com/fumiama/terasu-cloudflared.git
synced 2026-06-08 12:00:36 +08:00
TUN-1099: Bring back changes in 2018.10.1
This commit is contained in:
20
cmd/cloudflared/tunnel/hello.go
Normal file
20
cmd/cloudflared/tunnel/hello.go
Normal file
@@ -0,0 +1,20 @@
|
||||
package tunnel
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"gopkg.in/urfave/cli.v2"
|
||||
|
||||
"github.com/cloudflare/cloudflared/hello"
|
||||
)
|
||||
|
||||
func helloWorld(c *cli.Context) error {
|
||||
address := fmt.Sprintf(":%d", c.Int("port"))
|
||||
listener, err := hello.CreateTLSListener(address)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer listener.Close()
|
||||
err = hello.StartHelloWorldServer(logger, listener, nil)
|
||||
return err
|
||||
}
|
||||
Reference in New Issue
Block a user