Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
企猫商务
frp
提交
591023a1
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 搜索 >>
未验证
提交
591023a1
编写于
5月 12, 2020
作者:
T
Tank
提交者:
GitHub
5月 12, 2020
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix: add frpc tls_enable flag and frps tls_only flag (#1798)
上级
1ab23b5e
变更
10
隐藏空白更改
内联
并排
Showing
10 changed file
with
14 addition
and
0 deletion
+14
-0
cmd/frpc/sub/http.go
cmd/frpc/sub/http.go
+1
-0
cmd/frpc/sub/https.go
cmd/frpc/sub/https.go
+1
-0
cmd/frpc/sub/root.go
cmd/frpc/sub/root.go
+3
-0
cmd/frpc/sub/stcp.go
cmd/frpc/sub/stcp.go
+1
-0
cmd/frpc/sub/sudp.go
cmd/frpc/sub/sudp.go
+1
-0
cmd/frpc/sub/tcp.go
cmd/frpc/sub/tcp.go
+1
-0
cmd/frpc/sub/tcpmux.go
cmd/frpc/sub/tcpmux.go
+1
-0
cmd/frpc/sub/udp.go
cmd/frpc/sub/udp.go
+1
-0
cmd/frpc/sub/xtcp.go
cmd/frpc/sub/xtcp.go
+1
-0
cmd/frps/root.go
cmd/frps/root.go
+3
-0
未找到文件。
cmd/frpc/sub/http.go
浏览文件 @
591023a1
...
...
@@ -46,6 +46,7 @@ func init() {
httpCmd
.
PersistentFlags
()
.
StringVarP
(
&
hostHeaderRewrite
,
"host_header_rewrite"
,
""
,
""
,
"host header rewrite"
)
httpCmd
.
PersistentFlags
()
.
BoolVarP
(
&
useEncryption
,
"ue"
,
""
,
false
,
"use encryption"
)
httpCmd
.
PersistentFlags
()
.
BoolVarP
(
&
useCompression
,
"uc"
,
""
,
false
,
"use compression"
)
httpCmd
.
PersistentFlags
()
.
BoolVarP
(
&
tlsEnable
,
"tls_enable"
,
""
,
false
,
"enable frpc tls"
)
rootCmd
.
AddCommand
(
httpCmd
)
}
...
...
cmd/frpc/sub/https.go
浏览文件 @
591023a1
...
...
@@ -42,6 +42,7 @@ func init() {
httpsCmd
.
PersistentFlags
()
.
StringVarP
(
&
subDomain
,
"sd"
,
""
,
""
,
"sub domain"
)
httpsCmd
.
PersistentFlags
()
.
BoolVarP
(
&
useEncryption
,
"ue"
,
""
,
false
,
"use encryption"
)
httpsCmd
.
PersistentFlags
()
.
BoolVarP
(
&
useCompression
,
"uc"
,
""
,
false
,
"use compression"
)
httpsCmd
.
PersistentFlags
()
.
BoolVarP
(
&
tlsEnable
,
"tls_enable"
,
""
,
false
,
"enable frpc tls"
)
rootCmd
.
AddCommand
(
httpsCmd
)
}
...
...
cmd/frpc/sub/root.go
浏览文件 @
591023a1
...
...
@@ -71,6 +71,8 @@ var (
bindAddr
string
bindPort
int
tlsEnable
bool
kcpDoneCh
chan
struct
{}
)
...
...
@@ -172,6 +174,7 @@ func parseClientCommonCfgFromCmd() (cfg config.ClientCommonConf, err error) {
// Only token authentication is supported in cmd mode
cfg
.
AuthClientConfig
=
auth
.
GetDefaultAuthClientConf
()
cfg
.
Token
=
token
cfg
.
TLSEnable
=
tlsEnable
return
}
...
...
cmd/frpc/sub/stcp.go
浏览文件 @
591023a1
...
...
@@ -44,6 +44,7 @@ func init() {
stcpCmd
.
PersistentFlags
()
.
IntVarP
(
&
bindPort
,
"bind_port"
,
""
,
0
,
"bind port"
)
stcpCmd
.
PersistentFlags
()
.
BoolVarP
(
&
useEncryption
,
"ue"
,
""
,
false
,
"use encryption"
)
stcpCmd
.
PersistentFlags
()
.
BoolVarP
(
&
useCompression
,
"uc"
,
""
,
false
,
"use compression"
)
stcpCmd
.
PersistentFlags
()
.
BoolVarP
(
&
tlsEnable
,
"tls_enable"
,
""
,
false
,
"enable frpc tls"
)
rootCmd
.
AddCommand
(
stcpCmd
)
}
...
...
cmd/frpc/sub/sudp.go
浏览文件 @
591023a1
...
...
@@ -44,6 +44,7 @@ func init() {
sudpCmd
.
PersistentFlags
()
.
IntVarP
(
&
bindPort
,
"bind_port"
,
""
,
0
,
"bind port"
)
sudpCmd
.
PersistentFlags
()
.
BoolVarP
(
&
useEncryption
,
"ue"
,
""
,
false
,
"use encryption"
)
sudpCmd
.
PersistentFlags
()
.
BoolVarP
(
&
useCompression
,
"uc"
,
""
,
false
,
"use compression"
)
sudpCmd
.
PersistentFlags
()
.
BoolVarP
(
&
tlsEnable
,
"tls_enable"
,
""
,
false
,
"enable frpc tls"
)
rootCmd
.
AddCommand
(
sudpCmd
)
}
...
...
cmd/frpc/sub/tcp.go
浏览文件 @
591023a1
...
...
@@ -40,6 +40,7 @@ func init() {
tcpCmd
.
PersistentFlags
()
.
IntVarP
(
&
remotePort
,
"remote_port"
,
"r"
,
0
,
"remote port"
)
tcpCmd
.
PersistentFlags
()
.
BoolVarP
(
&
useEncryption
,
"ue"
,
""
,
false
,
"use encryption"
)
tcpCmd
.
PersistentFlags
()
.
BoolVarP
(
&
useCompression
,
"uc"
,
""
,
false
,
"use compression"
)
tcpCmd
.
PersistentFlags
()
.
BoolVarP
(
&
tlsEnable
,
"tls_enable"
,
""
,
false
,
"enable frpc tls"
)
rootCmd
.
AddCommand
(
tcpCmd
)
}
...
...
cmd/frpc/sub/tcpmux.go
浏览文件 @
591023a1
...
...
@@ -43,6 +43,7 @@ func init() {
tcpMuxCmd
.
PersistentFlags
()
.
StringVarP
(
&
multiplexer
,
"mux"
,
""
,
""
,
"multiplexer"
)
tcpMuxCmd
.
PersistentFlags
()
.
BoolVarP
(
&
useEncryption
,
"ue"
,
""
,
false
,
"use encryption"
)
tcpMuxCmd
.
PersistentFlags
()
.
BoolVarP
(
&
useCompression
,
"uc"
,
""
,
false
,
"use compression"
)
tcpMuxCmd
.
PersistentFlags
()
.
BoolVarP
(
&
tlsEnable
,
"tls_enable"
,
""
,
false
,
"enable frpc tls"
)
rootCmd
.
AddCommand
(
tcpMuxCmd
)
}
...
...
cmd/frpc/sub/udp.go
浏览文件 @
591023a1
...
...
@@ -40,6 +40,7 @@ func init() {
udpCmd
.
PersistentFlags
()
.
IntVarP
(
&
remotePort
,
"remote_port"
,
"r"
,
0
,
"remote port"
)
udpCmd
.
PersistentFlags
()
.
BoolVarP
(
&
useEncryption
,
"ue"
,
""
,
false
,
"use encryption"
)
udpCmd
.
PersistentFlags
()
.
BoolVarP
(
&
useCompression
,
"uc"
,
""
,
false
,
"use compression"
)
udpCmd
.
PersistentFlags
()
.
BoolVarP
(
&
tlsEnable
,
"tls_enable"
,
""
,
false
,
"enable frpc tls"
)
rootCmd
.
AddCommand
(
udpCmd
)
}
...
...
cmd/frpc/sub/xtcp.go
浏览文件 @
591023a1
...
...
@@ -44,6 +44,7 @@ func init() {
xtcpCmd
.
PersistentFlags
()
.
IntVarP
(
&
bindPort
,
"bind_port"
,
""
,
0
,
"bind port"
)
xtcpCmd
.
PersistentFlags
()
.
BoolVarP
(
&
useEncryption
,
"ue"
,
""
,
false
,
"use encryption"
)
xtcpCmd
.
PersistentFlags
()
.
BoolVarP
(
&
useCompression
,
"uc"
,
""
,
false
,
"use compression"
)
xtcpCmd
.
PersistentFlags
()
.
BoolVarP
(
&
tlsEnable
,
"tls_enable"
,
""
,
false
,
"enable frpc tls"
)
rootCmd
.
AddCommand
(
xtcpCmd
)
}
...
...
cmd/frps/root.go
浏览文件 @
591023a1
...
...
@@ -60,6 +60,7 @@ var (
allowPorts
string
maxPoolCount
int64
maxPortsPerClient
int64
tlsOnly
bool
)
func
init
()
{
...
...
@@ -87,6 +88,7 @@ func init() {
rootCmd
.
PersistentFlags
()
.
StringVarP
(
&
subDomainHost
,
"subdomain_host"
,
""
,
""
,
"subdomain host"
)
rootCmd
.
PersistentFlags
()
.
StringVarP
(
&
allowPorts
,
"allow_ports"
,
""
,
""
,
"allow ports"
)
rootCmd
.
PersistentFlags
()
.
Int64VarP
(
&
maxPortsPerClient
,
"max_ports_per_client"
,
""
,
0
,
"max ports per client"
)
rootCmd
.
PersistentFlags
()
.
BoolVarP
(
&
tlsOnly
,
"tls_only"
,
""
,
false
,
"frps tls only"
)
}
var
rootCmd
=
&
cobra
.
Command
{
...
...
@@ -173,6 +175,7 @@ func parseServerCommonCfgFromCmd() (cfg config.ServerCommonConf, err error) {
cfg
.
LogLevel
=
logLevel
cfg
.
LogMaxDays
=
logMaxDays
cfg
.
SubDomainHost
=
subDomainHost
cfg
.
TlsOnly
=
tlsOnly
// Only token authentication is supported in cmd mode
cfg
.
AuthServerConfig
=
auth
.
GetDefaultAuthServerConf
()
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录