[GH-ISSUE #3024] Token 错误 #2418

Closed
opened 2026-05-05 13:33:15 -06:00 by gitea-mirror · 3 comments
Owner

Originally created by @orestonce on GitHub (Jul 19, 2022).
Original GitHub issue: https://github.com/fatedier/frp/issues/3024

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

  • Docs
  • Installation
  • Performance and Scalability
  • Security
  • User Experience
  • Test and Release
  • Developer Infrastructure
  • Client Plugin
  • Server Plugin
  • Extensions
  • Others
Originally created by @orestonce on GitHub (Jul 19, 2022). Original GitHub issue: https://github.com/fatedier/frp/issues/3024 ### 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 - [X] Docs - [ ] Installation - [ ] Performance and Scalability - [ ] Security - [ ] User Experience - [ ] Test and Release - [ ] Developer Infrastructure - [ ] Client Plugin - [ ] Server Plugin - [ ] Extensions - [ ] Others
Author
Owner

@Becods commented on GitHub (Jul 20, 2022):

无法复现
image

<!-- gh-comment-id:1189847154 --> @Becods commented on GitHub (Jul 20, 2022): 无法复现 ![image](https://user-images.githubusercontent.com/35525491/179904314-d3ddfe0d-4b9f-4d8e-9772-c10b1964cc63.png)
Author
Owner

@orestonce commented on GitHub (Jul 20, 2022):

你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'
未命名
<!-- gh-comment-id:1189882275 --> @orestonce commented on GitHub (Jul 20, 2022): 你build一下这个docker就复现了 ````Dockerfile 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' ```` <img width="1210" alt="未命名" src="https://user-images.githubusercontent.com/6974828/179912423-98b04bf9-5ed2-496a-935f-9c6cc1406b34.png">
Author
Owner

@orestonce commented on GitHub (Jul 20, 2022):

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

<!-- gh-comment-id:1189959459 --> @orestonce commented on GitHub (Jul 20, 2022): -_- 搞错了,frps -c frps.ini这样才能加载配置文件
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/frp#2418
No description provided.