fatedier / frp

A fast reverse proxy to help you expose a local server behind a NAT or firewall to the internet.
Apache License 2.0
85.11k stars 13.21k forks source link

Token 错误 #3024

Closed orestonce closed 2 years ago

orestonce commented 2 years ago

Bug Description

不配置token是就可以连接, 配置token就立刻错误

frpc Version

0.44.0

frps Version

0.44.0

System Architecture

linux/amd64

Configurations

客户端:

[common]
server_addr = 127.0.0.1
server_port = 7000
token = 1234567890

[ssh]
type = tcp
local_ip = 127.0.0.1
local_port = 22
remote_port = 6000

服务端

[common]
bind_port = 7000
token = 1234567890

Logs

客户端

2022/07/20 07:44:56 [E] [service.go:228] authorization failed
2022/07/20 07:44:56 [W] [service.go:86] login to server failed: authorization failed
authorization failed

服务端

2022/07/20 07:44:54 [I] [service.go:139] frps tcp listen on 0.0.0.0:7000
2022/07/20 07:44:54 [I] [root.go:205] Start frps success
2022/07/20 07:44:56 [I] [service.go:356] client login info: ip [127.0.0.1:40398] version [0.29.0] hostname [] os [linux] arch [amd64]
2022/07/20 07:44:56 [W] [service.go:298] authorization failed

Steps to reproduce

No response

Affected area

Becods commented 2 years ago

无法复现 image

orestonce commented 2 years ago

你build一下这个docker就复现了

FROM ubuntu:20.04

RUN apt-get update && apt-get install curl -y
WORKDIR /workdir
RUN curl https://github.com/fatedier/frp/releases/download/v0.44.0/frp_0.44.0_linux_amd64.tar.gz -L > 1.tar.gz && tar xfz 1.tar.gz && rm -rf 1.tar.gz
WORKDIR /workdir/frp_0.44.0_linux_amd64
RUN rm -f *.ini
RUN echo "[common]" >> frpc.ini
RUN echo "server_addr = 127.0.0.1" >> frpc.ini
RUN echo "server_port = 7000" >> frpc.ini
RUN echo "token = 1234567890" >> frpc.ini
RUN echo "[ssh]" >> frpc.ini
RUN echo "type = tcp" >> frpc.ini
RUN echo "local_ip = 127.0.0.1" >> frpc.ini
RUN echo "local_port = 22" >> frpc.ini
RUN echo "remote_port = 6000" >> frpc.ini

RUN echo "[common]" >> frps.ini
RUN echo "bind_port = 7000" >> frps.ini
RUN echo "token = 1234567890" >> frps.ini

RUN bash -c './frps & sleep 1 && ./frpc'
未命名
orestonce commented 2 years ago

-_- 搞错了,frps -c frps.ini这样才能加载配置文件