Skip to content

Commit

Permalink
Merge pull request #31 from vyloy/dev
Browse files Browse the repository at this point in the history
* add more log
* update README
  • Loading branch information
vyloy authored Sep 14, 2023
2 parents 0c5f740 + 31cd652 commit 3d2ff2f
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 7 deletions.
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,6 @@ users:
options:
apiAddr: 1.2.3.4:1234
certFile: /path
host: 1.2.3.4
keyFile: /path
logFile: /path
logFileMaxCount: 1234
Expand Down Expand Up @@ -213,7 +212,6 @@ tcp:
options:
apiAddr: 1.2.3.4:1234
certFile: /path
host: 1.2.3.4
keyFile: /path
logFile: /path
logFileMaxCount: 1234
Expand Down
2 changes: 0 additions & 2 deletions README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,6 @@ users:
options:
apiAddr: 1.2.3.4:1234
certFile: /path
host: 1.2.3.4
keyFile: /path
logFile: /path
logFileMaxCount: 1234
Expand Down Expand Up @@ -203,7 +202,6 @@ tcp:
options:
apiAddr: 1.2.3.4:1234
certFile: /path
host: 1.2.3.4
keyFile: /path
logFile: /path
logFileMaxCount: 1234
Expand Down
2 changes: 1 addition & 1 deletion client/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ type Options struct {
RemoteIdleConnections uint `yaml:"remoteIdleConnections" usage:"The number of idle server connections kept in the pool"`
RemoteTimeout time.Duration `yaml:"remoteTimeout" usage:"The timeout of remote connections. Supports values like '30s', '5m'"`

HostPrefix config.PositionSlice[string] `yaml:"hostPrefix" usage:"The server will recognize this host prefix and forward data to local"`
HostPrefix config.PositionSlice[string] `yaml:"-" arg:"hostPrefix" usage:"The server will recognize this host prefix and forward data to local"`
RemoteTCPPort config.PositionSlice[uint16] `yaml:"-" arg:"remoteTCPPort" usage:"The TCP port that the remote server will open"`
RemoteTCPRandom config.PositionSlice[bool] `yaml:"-" arg:"remoteTCPRandom" usage:"Whether to choose a random tcp port by the remote server"`
Local config.PositionSlice[string] `yaml:"-" arg:"local" usage:"The local service url"`
Expand Down
4 changes: 2 additions & 2 deletions server/conn.go
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ func (c *conn) handleTunnel(remoteIP string, r bool) (handled, reload bool, cli
}

e := c.SendErrorSignalInvalidIDAndSecret()
c.Logger.Info().Err(err).AnErr("respErr", e).Msg("invalid id and secret")
c.Logger.Info().Err(err).Str("id", idStr).AnErr("respErr", e).Msg("invalid id and secret")
return
}

Expand Down Expand Up @@ -389,7 +389,7 @@ func (c *conn) handleTunnel(remoteIP string, r bool) (handled, reload bool, cli
}

e := c.SendErrorSignalInvalidIDAndSecret()
c.Logger.Info().Err(err).AnErr("respErr", e).Msg("invalid id and secret")
c.Logger.Info().Err(err).Str("id", idStr).AnErr("respErr", e).Msg("invalid id and secret")
return
}
if len(u.Host.Prefixes) > 0 {
Expand Down

0 comments on commit 3d2ff2f

Please sign in to comment.