-
-
Notifications
You must be signed in to change notification settings - Fork 13.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: ssh client implement #3671
Conversation
d25b21a
to
2d463cc
Compare
e443c8f
to
a5a9668
Compare
1018de7
to
0724b0f
Compare
0724b0f
to
fdd0699
Compare
server/ssh_service.go
Outdated
} | ||
} | ||
|
||
func parseSSHExtraMessage(s string) (p SSHExtraPayload, err error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这部分需要看下怎么结合 cobra 来解析,能复用命令行参数解析的代码最好。
server/vclient_service.go
Outdated
) | ||
|
||
// VirtualService is a client VirtualService run in frps | ||
type VirtualService struct { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里的整体设计有问题,把部分 frps 的逻辑放到这里去运行了。
这里应该是一个 VirtualClient,构造一个虚拟的 net.Conn 和 frps 之间交互,然后负责处理和发送 Message。
b2aef87
to
4502159
Compare
4502159
to
40677ce
Compare
@@ -31,6 +41,9 @@ type ServerConfig struct { | |||
// BindPort specifies the port that the server listens on. By default, this | |||
// value is 7000. | |||
BindPort int `json:"bindPort,omitempty"` | |||
|
|||
SSHTunnelGateway SSHTunnelGateway `json:"sshGatewayConfig,omitempty"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SSHTunnelGateway SSHTunnelGateway `json:"sshGatewayConfig,omitempty"` | |
SSHTunnelGateway SSHTunnelGateway `json:"SSHTunnelGateway,omitempty"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个不要放到 pkg/config 下面,应该放到 pkg/ssh 里
* feat: frps support ssh * fix: comments * fix: update pkg * fix: remove useless change --------- Co-authored-by: int7 <[email protected]>
* feat: frps support ssh * fix: comments * fix: update pkg * fix: remove useless change --------- Co-authored-by: int7 <[email protected]>
* feat: frps support ssh * fix: comments * fix: update pkg * fix: remove useless change --------- Co-authored-by: int7 <[email protected]>
* https://github.com/fatedier/frp: sshTunnelGateway refactor (fatedier#3784) feat: ssh client implement (fatedier#3671) Fix various typos (fatedier#3783)
No description provided.