mirror of
https://github.com/schollz/croc.git
synced 2025-10-11 05:11:06 +02:00
specify relay ports
This commit is contained in:
parent
ae7ceca3b7
commit
1223b3e51d
3 changed files with 56 additions and 1 deletions
5
main.go
5
main.go
|
@ -4,6 +4,7 @@ import (
|
|||
"errors"
|
||||
"fmt"
|
||||
"os"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
croc "github.com/schollz/croc/src"
|
||||
|
@ -57,6 +58,7 @@ func main() {
|
|||
Flags: []cli.Flag{
|
||||
cli.StringFlag{Name: "tcp", Value: "27130,27131,27132,27133", Usage: "ports for the tcp connections"},
|
||||
cli.StringFlag{Name: "port", Value: "8130", Usage: "port that the websocket listens on"},
|
||||
cli.StringFlag{Name: "curve", Value: "siec", Usage: "specify elliptic curve to use (p224, p256, p384, p521, siec)"},
|
||||
},
|
||||
HelpName: "croc relay",
|
||||
Action: func(c *cli.Context) error {
|
||||
|
@ -112,6 +114,9 @@ func receive(c *cli.Context) error {
|
|||
}
|
||||
|
||||
func relay(c *cli.Context) error {
|
||||
cr.TcpPorts = strings.Split(c.GlobalString("tcp"), ",")
|
||||
cr.ServerPort = c.GlobalString("port")
|
||||
cr.CurveType = c.GlobalString("curve")
|
||||
fmt.Println("relay")
|
||||
return nil
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue