Skip to content
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

Server manager support the NewUserConn operation #1740

Merged
merged 4 commits into from Apr 16, 2020

Conversation

 arugal
Copy link
Contributor

Issues associated with this PR

#1731

 @arugal arugal marked this pull request as ready for review April 9, 2020 16:18
 @arugal arugal changed the title [WIP] Server manager supports the NewUserConn operation Server manager support the NewUserConn operation Apr 9, 2020
 @fatedier fatedier self-assigned this Apr 12, 2020
doc/server_plugin.md Outdated Show resolved Hide resolved
doc/server_plugin.md Outdated Show resolved Hide resolved
models/plugin/server/types.go Outdated Show resolved Hide resolved
models/plugin/server/types.go Outdated Show resolved Hide resolved
server/control.go Outdated Show resolved Hide resolved
server/proxy/proxy.go Outdated Show resolved Hide resolved
models/plugin/server/types.go Outdated Show resolved Hide resolved
models/plugin/server/manager.go Outdated Show resolved Hide resolved
server/proxy/proxy.go Outdated Show resolved Hide resolved
 @arugal
Copy link
Contributor Author

Hi @fatedier I have made a preliminary modification and will submit a test feedback later.

models/msg/msg.go Outdated Show resolved Hide resolved
server/proxy/proxy.go Outdated Show resolved Hide resolved
server/proxy/proxy.go Show resolved Hide resolved
 @fatedier
Copy link
Owner

Have you test it on all tcp, http and https type proxy mentioned in document?

 @arugal
Copy link
Contributor Author

Have you test it on all tcp, http and https type proxy mentioned in document?

Doing

 @arugal
Copy link
Contributor Author

arugal commented Apr 14, 2020

Configuration

  • frps
 [common] bind_port = 7000 vhost_https_port = 7001 vhost_http_port = 7002 tcpmux_httpconnect_port = 7003 [plugin.frp-notify] addr = 127.0.0.1:80 path = /handler ops = NewUserConn
  • frpc
 [common] server_addr = 127.0.0.1 server_port = 7000 [ssh] type = tcp local_ip = 127.0.0.1 local_port = 22 remote_port = 6000 [stcp] type = stcp sk = stcp local_ip = 127.0.0.1 local_port = 22 [https] type = https local_port = 80 custom_domains = notify-https.com [http] type = http local_port = 80 custom_domains = notify-http.com [proxy1] type = tcpmux local_port = 80 multiplexer = httpconnect custom_domains = notify-proxy1.com [proxy2] type = tcpmux local_port = 80 multiplexer = httpconnect custom_domains = notify-proxy2.com

Result

  • tcp
 NewUserConn - map[proxy_name:ssh proxy_type:tcp remote_addr:127.0.0.1:60720 user:map[metas:map[] run_id:104c9d5726c633ab user:]]
  • stcp
 NewUserConn map[proxy_name:stcp proxy_type:stcp remote_addr:127.0.0.1:61980 user:map[metas:map[] run_id:e762c76476ef55bb user:]]
  • https
 NewUserConn map[proxy_name:https proxy_type:https remote_addr:127.0.0.1:62471 user:map[metas:map[] run_id:b67ab8545e920cdc user:]]
  • tcpmux
 NewUserConn map[proxy_name:proxy1 proxy_type:tcpmux remote_addr:127.0.0.1:63086 user:map[metas:map[] run_id:13a94e8e6d911539 user:]]

 @fatedier
Copy link
Owner

@arugal Proxy type https, tcpmux, stcp, tcp have all called the HandleUserTcpConnection function.

 @arugal
Copy link
Contributor Author

@arugal Proxy type https, tcpmux, stcp, tcp have all called the HandleUserTcpConnection function.

The test results have been updated. Please review :)

 @arugal
Copy link
Contributor Author

Server manager plugin implementation.

 @blizard863 blizard863 self-requested a review April 16, 2020 01:39
 @fatedier fatedier merged commit ad0c449 into fatedier : dev Apr 16, 2020
 @arugal arugal deleted the patch-1 branch April 16, 2020 05:22
Sign up for free to join this conversation on GitHub . Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants