mirror of
https://github.com/fatedier/frp.git
synced 2026-03-08 10:59:11 +08:00
fix: typos in comments, tests, functions (#5216)
This commit is contained in:
@@ -47,7 +47,7 @@ var natholeDiscoveryCmd = &cobra.Command{
|
|||||||
Use: "discover",
|
Use: "discover",
|
||||||
Short: "Discover nathole information from stun server",
|
Short: "Discover nathole information from stun server",
|
||||||
RunE: func(cmd *cobra.Command, args []string) error {
|
RunE: func(cmd *cobra.Command, args []string) error {
|
||||||
// ignore error here, because we can use command line pameters
|
// ignore error here, because we can use command line parameters
|
||||||
cfg, _, _, _, err := config.LoadClientConfig(cfgFile, strictConfigMode)
|
cfg, _, _, _, err := config.LoadClientConfig(cfgFile, strictConfigMode)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
cfg = &v1.ClientCommonConfig{}
|
cfg = &v1.ClientCommonConfig{}
|
||||||
|
|||||||
@@ -193,7 +193,7 @@ func NewService(cfg *v1.ServerConfig) (*Service, error) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, fmt.Errorf("create vhost tcpMuxer error, %v", err)
|
return nil, fmt.Errorf("create vhost tcpMuxer error, %v", err)
|
||||||
}
|
}
|
||||||
log.Infof("tcpmux httpconnect multiplexer listen on %s, passthough: %v", address, cfg.TCPMuxPassthrough)
|
log.Infof("tcpmux httpconnect multiplexer listen on %s, passthrough: %v", address, cfg.TCPMuxPassthrough)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Init all plugins
|
// Init all plugins
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ var _ = ginkgo.Describe("[Feature: Server Manager]", func() {
|
|||||||
tcpPortName := port.GenName("TCP", port.WithRangePorts(10000, 11000))
|
tcpPortName := port.GenName("TCP", port.WithRangePorts(10000, 11000))
|
||||||
udpPortName := port.GenName("UDP", port.WithRangePorts(12000, 13000))
|
udpPortName := port.GenName("UDP", port.WithRangePorts(12000, 13000))
|
||||||
clientConf += fmt.Sprintf(`
|
clientConf += fmt.Sprintf(`
|
||||||
[tcp-allowded-in-range]
|
[tcp-allowed-in-range]
|
||||||
type = tcp
|
type = tcp
|
||||||
local_port = {{ .%s }}
|
local_port = {{ .%s }}
|
||||||
remote_port = {{ .%s }}
|
remote_port = {{ .%s }}
|
||||||
|
|||||||
@@ -75,11 +75,11 @@ func (c *TunnelClient) serveListener() {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
go c.hanldeConn(conn)
|
go c.handleConn(conn)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *TunnelClient) hanldeConn(conn net.Conn) {
|
func (c *TunnelClient) handleConn(conn net.Conn) {
|
||||||
defer conn.Close()
|
defer conn.Close()
|
||||||
local, err := net.Dial("tcp", c.localAddr)
|
local, err := net.Dial("tcp", c.localAddr)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ var _ = ginkgo.Describe("[Feature: Server Manager]", func() {
|
|||||||
udpPortName := port.GenName("UDP", port.WithRangePorts(12000, 13000))
|
udpPortName := port.GenName("UDP", port.WithRangePorts(12000, 13000))
|
||||||
clientConf += fmt.Sprintf(`
|
clientConf += fmt.Sprintf(`
|
||||||
[[proxies]]
|
[[proxies]]
|
||||||
name = "tcp-allowded-in-range"
|
name = "tcp-allowed-in-range"
|
||||||
type = "tcp"
|
type = "tcp"
|
||||||
localPort = {{ .%s }}
|
localPort = {{ .%s }}
|
||||||
remotePort = {{ .%s }}
|
remotePort = {{ .%s }}
|
||||||
|
|||||||
Reference in New Issue
Block a user