Skip to content

Commit

Permalink
plugin: add http_proxy
Browse files Browse the repository at this point in the history
  • Loading branch information
fatedier committed May 30, 2017
1 parent e6d82f3 commit 03d5520
Show file tree
Hide file tree
Showing 8 changed files with 237 additions and 246 deletions.
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ sudo: false
language: go

go:
- 1.7.x
- 1.8.x

install:
Expand Down
3 changes: 0 additions & 3 deletions client/proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ func (pxy *TcpProxy) Close() {
}

func (pxy *TcpProxy) InWorkConn(conn frpNet.Conn) {
defer conn.Close()
HandleTcpWorkConnection(&pxy.cfg.LocalSvrConf, pxy.proxyPlugin, &pxy.cfg.BaseProxyConf, conn)
}

Expand Down Expand Up @@ -132,7 +131,6 @@ func (pxy *HttpProxy) Close() {
}

func (pxy *HttpProxy) InWorkConn(conn frpNet.Conn) {
defer conn.Close()
HandleTcpWorkConnection(&pxy.cfg.LocalSvrConf, pxy.proxyPlugin, &pxy.cfg.BaseProxyConf, conn)
}

Expand Down Expand Up @@ -161,7 +159,6 @@ func (pxy *HttpsProxy) Close() {
}

func (pxy *HttpsProxy) InWorkConn(conn frpNet.Conn) {
defer conn.Close()
HandleTcpWorkConnection(&pxy.cfg.LocalSvrConf, pxy.proxyPlugin, &pxy.cfg.BaseProxyConf, conn)
}

Expand Down
11 changes: 9 additions & 2 deletions conf/frpc_full.ini
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,18 @@ use_compression = false
subdomain = web01
custom_domains = web02.yourdomain.com

[unix_domain_socket]
[plugin_unix_domain_socket]
type = tcp
remote_port = 6001
remote_port = 6003
# if plugin is defined, local_ip and local_port is useless
# plugin will handle connections got from frps
plugin = unix_domain_socket
# params set with prefix "plugin_" that plugin needed
plugin_unix_path = /var/run/docker.sock

[plugin_http_proxy]
type = tcp
remote_port = 6004
plugin = http_proxy
plugin_http_user = abc
plugin_http_passwd = abc
3 changes: 0 additions & 3 deletions models/plugin/http-proxy/config/config.json

This file was deleted.

32 changes: 0 additions & 32 deletions models/plugin/http-proxy/proxy/config.go

This file was deleted.

203 changes: 0 additions & 203 deletions models/plugin/http-proxy/proxy/proxy.go

This file was deleted.

Loading

0 comments on commit 03d5520

Please sign in to comment.