Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
企猫商务
frp
提交
48990da2
F
frp
项目概览
企猫商务
/
frp
与 Fork 源项目一致
从无法访问的项目Fork
通知
3
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
F
frp
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
48990da2
编写于
1月 31, 2019
作者:
F
fatedier
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
go vet
上级
c41de6fd
变更
11
隐藏空白更改
内联
并排
Showing
11 changed file
with
29 addition
and
30 deletion
+29
-30
client/proxy/proxy.go
client/proxy/proxy.go
+12
-12
client/visitor.go
client/visitor.go
+4
-4
models/config/server_common.go
models/config/server_common.go
+1
-1
models/proto/udp/udp.go
models/proto/udp/udp.go
+0
-1
server/proxy/http.go
server/proxy/http.go
+1
-1
server/proxy/https.go
server/proxy/https.go
+1
-1
server/proxy/proxy.go
server/proxy/proxy.go
+6
-6
server/proxy/stcp.go
server/proxy/stcp.go
+1
-1
server/proxy/tcp.go
server/proxy/tcp.go
+1
-1
server/proxy/udp.go
server/proxy/udp.go
+1
-1
server/proxy/xtcp.go
server/proxy/xtcp.go
+1
-1
未找到文件。
client/proxy/proxy.go
浏览文件 @
48990da2
...
...
@@ -53,32 +53,32 @@ func NewProxy(pxyConf config.ProxyConf) (pxy Proxy) {
switch
cfg
:=
pxyConf
.
(
type
)
{
case
*
config
.
TcpProxyConf
:
pxy
=
&
TcpProxy
{
BaseProxy
:
baseProxy
,
BaseProxy
:
&
baseProxy
,
cfg
:
cfg
,
}
case
*
config
.
UdpProxyConf
:
pxy
=
&
UdpProxy
{
BaseProxy
:
baseProxy
,
BaseProxy
:
&
baseProxy
,
cfg
:
cfg
,
}
case
*
config
.
HttpProxyConf
:
pxy
=
&
HttpProxy
{
BaseProxy
:
baseProxy
,
BaseProxy
:
&
baseProxy
,
cfg
:
cfg
,
}
case
*
config
.
HttpsProxyConf
:
pxy
=
&
HttpsProxy
{
BaseProxy
:
baseProxy
,
BaseProxy
:
&
baseProxy
,
cfg
:
cfg
,
}
case
*
config
.
StcpProxyConf
:
pxy
=
&
StcpProxy
{
BaseProxy
:
baseProxy
,
BaseProxy
:
&
baseProxy
,
cfg
:
cfg
,
}
case
*
config
.
XtcpProxyConf
:
pxy
=
&
XtcpProxy
{
BaseProxy
:
baseProxy
,
BaseProxy
:
&
baseProxy
,
cfg
:
cfg
,
}
}
...
...
@@ -93,7 +93,7 @@ type BaseProxy struct {
// TCP
type
TcpProxy
struct
{
BaseProxy
*
BaseProxy
cfg
*
config
.
TcpProxyConf
proxyPlugin
plugin
.
Plugin
...
...
@@ -122,7 +122,7 @@ func (pxy *TcpProxy) InWorkConn(conn frpNet.Conn) {
// HTTP
type
HttpProxy
struct
{
BaseProxy
*
BaseProxy
cfg
*
config
.
HttpProxyConf
proxyPlugin
plugin
.
Plugin
...
...
@@ -151,7 +151,7 @@ func (pxy *HttpProxy) InWorkConn(conn frpNet.Conn) {
// HTTPS
type
HttpsProxy
struct
{
BaseProxy
*
BaseProxy
cfg
*
config
.
HttpsProxyConf
proxyPlugin
plugin
.
Plugin
...
...
@@ -180,7 +180,7 @@ func (pxy *HttpsProxy) InWorkConn(conn frpNet.Conn) {
// STCP
type
StcpProxy
struct
{
BaseProxy
*
BaseProxy
cfg
*
config
.
StcpProxyConf
proxyPlugin
plugin
.
Plugin
...
...
@@ -209,7 +209,7 @@ func (pxy *StcpProxy) InWorkConn(conn frpNet.Conn) {
// XTCP
type
XtcpProxy
struct
{
BaseProxy
*
BaseProxy
cfg
*
config
.
XtcpProxyConf
proxyPlugin
plugin
.
Plugin
...
...
@@ -308,7 +308,7 @@ func (pxy *XtcpProxy) InWorkConn(conn frpNet.Conn) {
// UDP
type
UdpProxy
struct
{
BaseProxy
*
BaseProxy
cfg
*
config
.
UdpProxyConf
...
...
client/visitor.go
浏览文件 @
48990da2
...
...
@@ -52,12 +52,12 @@ func NewVisitor(ctl *Control, cfg config.VisitorConf) (visitor Visitor) {
switch
cfg
:=
cfg
.
(
type
)
{
case
*
config
.
StcpVisitorConf
:
visitor
=
&
StcpVisitor
{
BaseVisitor
:
baseVisitor
,
BaseVisitor
:
&
baseVisitor
,
cfg
:
cfg
,
}
case
*
config
.
XtcpVisitorConf
:
visitor
=
&
XtcpVisitor
{
BaseVisitor
:
baseVisitor
,
BaseVisitor
:
&
baseVisitor
,
cfg
:
cfg
,
}
}
...
...
@@ -73,7 +73,7 @@ type BaseVisitor struct {
}
type
StcpVisitor
struct
{
BaseVisitor
*
BaseVisitor
cfg
*
config
.
StcpVisitorConf
}
...
...
@@ -160,7 +160,7 @@ func (sv *StcpVisitor) handleConn(userConn frpNet.Conn) {
}
type
XtcpVisitor
struct
{
BaseVisitor
*
BaseVisitor
cfg
*
config
.
XtcpVisitorConf
}
...
...
models/config/server_common.go
浏览文件 @
48990da2
...
...
@@ -51,7 +51,7 @@ type ServerCommonConf struct {
VhostHttpPort
int
`json:"vhost_http_port"`
// if VhostHttpsPort equals 0, don't listen a public port for https protocol
VhostHttpsPort
int
`json:"vhost_http_port"`
VhostHttpsPort
int
`json:"vhost_http
s
_port"`
VhostHttpTimeout
int64
`json:"vhost_http_timeout"`
...
...
models/proto/udp/udp.go
浏览文件 @
48990da2
...
...
@@ -67,7 +67,6 @@ func ForwardUserConn(udpConn *net.UDPConn, readCh <-chan *msg.UdpPacket, sendCh
default
:
}
}
return
}
func
Forwarder
(
dstAddr
*
net
.
UDPAddr
,
readCh
<-
chan
*
msg
.
UdpPacket
,
sendCh
chan
<-
msg
.
Message
)
{
...
...
server/proxy/http.go
浏览文件 @
48990da2
...
...
@@ -29,7 +29,7 @@ import (
)
type
HttpProxy
struct
{
BaseProxy
*
BaseProxy
cfg
*
config
.
HttpProxyConf
closeFuncs
[]
func
()
...
...
server/proxy/https.go
浏览文件 @
48990da2
...
...
@@ -24,7 +24,7 @@ import (
)
type
HttpsProxy
struct
{
BaseProxy
*
BaseProxy
cfg
*
config
.
HttpsProxyConf
}
...
...
server/proxy/proxy.go
浏览文件 @
48990da2
...
...
@@ -135,33 +135,33 @@ func NewProxy(runId string, rc *controller.ResourceController, statsCollector st
case
*
config
.
TcpProxyConf
:
basePxy
.
usedPortsNum
=
1
pxy
=
&
TcpProxy
{
BaseProxy
:
basePxy
,
BaseProxy
:
&
basePxy
,
cfg
:
cfg
,
}
case
*
config
.
HttpProxyConf
:
pxy
=
&
HttpProxy
{
BaseProxy
:
basePxy
,
BaseProxy
:
&
basePxy
,
cfg
:
cfg
,
}
case
*
config
.
HttpsProxyConf
:
pxy
=
&
HttpsProxy
{
BaseProxy
:
basePxy
,
BaseProxy
:
&
basePxy
,
cfg
:
cfg
,
}
case
*
config
.
UdpProxyConf
:
basePxy
.
usedPortsNum
=
1
pxy
=
&
UdpProxy
{
BaseProxy
:
basePxy
,
BaseProxy
:
&
basePxy
,
cfg
:
cfg
,
}
case
*
config
.
StcpProxyConf
:
pxy
=
&
StcpProxy
{
BaseProxy
:
basePxy
,
BaseProxy
:
&
basePxy
,
cfg
:
cfg
,
}
case
*
config
.
XtcpProxyConf
:
pxy
=
&
XtcpProxy
{
BaseProxy
:
basePxy
,
BaseProxy
:
&
basePxy
,
cfg
:
cfg
,
}
default
:
...
...
server/proxy/stcp.go
浏览文件 @
48990da2
...
...
@@ -19,7 +19,7 @@ import (
)
type
StcpProxy
struct
{
BaseProxy
*
BaseProxy
cfg
*
config
.
StcpProxyConf
}
...
...
server/proxy/tcp.go
浏览文件 @
48990da2
...
...
@@ -23,7 +23,7 @@ import (
)
type
TcpProxy
struct
{
BaseProxy
*
BaseProxy
cfg
*
config
.
TcpProxyConf
realPort
int
...
...
server/proxy/udp.go
浏览文件 @
48990da2
...
...
@@ -30,7 +30,7 @@ import (
)
type
UdpProxy
struct
{
BaseProxy
*
BaseProxy
cfg
*
config
.
UdpProxyConf
realPort
int
...
...
server/proxy/xtcp.go
浏览文件 @
48990da2
...
...
@@ -24,7 +24,7 @@ import (
)
type
XtcpProxy
struct
{
BaseProxy
*
BaseProxy
cfg
*
config
.
XtcpProxyConf
closeCh
chan
struct
{}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录