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

使用特权模式,开启use_encryption,frps产生错误退出 #85

Closed
Hirozy opened this issue Aug 21, 2016 · 3 comments
Closed

使用特权模式,开启use_encryption,frps产生错误退出 #85

Hirozy opened this issue Aug 21, 2016 · 3 comments
Labels

Comments

@Hirozy
Copy link

Hirozy commented Aug 21, 2016

服务器端开启特权模式

# frps.ini
[common]
bind_addr = 0.0.0.0
bind_port = 7500
vhost_http_port = 801
vhost_https_port = 443
dashboard_port = 7000
log_file = ./frps.log
log_level = info
log_max_days = 3
privilege_token is correct
privilege_mode = true
privilege_token = oxcm!Jkn/jQ(S?of
privilege_allow_ports = 2000-3000,3001,3003,4000-50000
max_pool_count = 100

客户端

# frpc.ini
[privilege_web1]
privilege_mode = true
type = http
local_ip = 127.0.0.1
local_port = 30000
use_gzip = true
use_encryption = true
custom_domains = xx.xxxx.xx

之后打开xx.xxxx.xx:801,frps就会自动退出,并且报错,错误内容如下

➜  frp ./frps -c frps.ini
panic: cipher.NewCBCEncrypter: IV length must equal block size

goroutine 25 [running]:
panic(0x794c80, 0xc82016b6a0)
        /usr/lib/golang/src/runtime/panic.go:481 +0x3e6
crypto/cipher.NewCBCEncrypter(0x7f9ca8a6dcf0, 0xc8201757d0, 0xc820308760, 0x20, 0x20, 0x0, 0x0)
        /usr/lib/golang/src/crypto/cipher/cbc.go:37 +0xa8
github.com/fatedier/frp/src/utils/pcrypto.(*Pcrypto).Encrypt(0xc820341eb8, 0xc820114380, 0x170, 0x1c0, 0x0, 0x0, 0x0, 0x0, 0x0)
        /home/wcl/go_projects/src/github.com/fatedier/frp/src/utils/pcrypto/pcrypto.go:44 +0xd5
github.com/fatedier/frp/src/models/msg.pipeEncrypt(0xc82032e080, 0xc82032e240, 0xc82016b370, 0xe, 0x0, 0x0, 0xc82016b35c, 0x4, 0x10101, 0xc820174162, ...)
        /home/wcl/go_projects/src/github.com/fatedier/frp/src/models/msg/process.go:242 +0x92c
github.com/fatedier/frp/src/models/msg.JoinMore.func1(0xc82032e080, 0xc82032e240)
        /home/wcl/go_projects/src/github.com/fatedier/frp/src/models/msg/process.go:64 +0x104
created by github.com/fatedier/frp/src/models/msg.JoinMore
        /home/wcl/go_projects/src/github.com/fatedier/frp/src/models/msg/process.go:80 +0x1ca
@JimLee1996
Copy link

没有填特权密码,或者端口选用不当吧

@Hirozy
Copy link
Author

Hirozy commented Aug 21, 2016

已经设置特权密码,端口选取没有问题
PS:use_encryption = false时正常

@fatedier fatedier added the bug label Aug 21, 2016
@fatedier
Copy link
Owner

已经确认这是一个 bug,你可以暂时将 privilege_token 改为一个小于 16 字节的字符串,后续会修复这个问题。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants