[GH-ISSUE #444] 使用以Session保存登录信息的网站时会发生丢失session造成登录信息丢失的问题 #337

Closed
opened 2026-05-05 12:08:27 -06:00 by gitea-mirror · 3 comments
Owner

Originally created by @fsea on GitHub (Aug 30, 2017).
Original GitHub issue: https://github.com/fatedier/frp/issues/444

Issue is only used for submiting bug report and documents typo. If there are same issues or answers can be found in documents, we will close it directly.
(为了节约时间,提高处理问题的效率,不按照格式填写的 issue 将会直接关闭。)

Use the commands below to provide key information from your environment:
You do NOT have to include this information if this is a FEATURE REQUEST

What version of frp are you using (./frpc -v or ./frps -v)?
v0.13.0

What operating system and processor architecture are you using (go env)?
frps:Windows2012
frpc:linux

Configures you used:

# [common] is integral section
[common]
# A literal address or host name for IPv6 must be enclosed
# in square brackets, as in "[::1]:80", "[ipv6-host]:http" or "[ipv6-host%zone]:80"
bind_addr = 0.0.0.0
bind_port = 7000

# if you want to support virtual host, you must set the http port for listening (optional)
vhost_http_port = 5000
vhost_https_port = 433

# if you want to configure or reload frps by dashboard, dashboard_port must be set
dashboard_port = 7500

# dashboard user and pwd for basic auth protect, if not set, both default value is admin
dashboard_user = admin
dashboard_pwd = aaaaa

# dashboard assets directory(only for debug mode)
# assets_dir = ./static
# console or real logFile path like ./frps.log
log_file = ./frps.log

# trace, debug, info, warn, error
log_level = info

log_max_days = 3

# privilege mode is the only supported mode since v0.10.0
privilege_token = xxxx

# heartbeat configure, it's not recommended to modify the default value
# the default value of heartbeat_timeout is 90
# heartbeat_timeout = 90

# only allow frpc to bind ports you list, if you set nothing, there won't be any limit
privilege_allow_ports = 5000,7000,7500,50001

# pool_count in each proxy will change to max_pool_count if they exceed the maximum value
max_pool_count = 255

# authentication_timeout means the timeout interval (seconds) when the frpc connects frps
# if authentication_timeout is zero, the time is not verified, default is 900s
authentication_timeout = 900

# if subdomain_host is not empty, you can set subdomain when type is http or https in frpc's configure file
# when subdomain is test, the host used by routing is test.frps.com
subdomain_host = gslan.com

# if tcp stream multiplexing is used, default is true
tcp_mux = true

Steps to reproduce the issue:
1.访问通过frp映射出来的网站
2.使用账号密码登录后台
3.

Describe the results you received:
经常性的丢失session。造成登录超时,被注销登录状态。

Describe the results you expected:
保存session,同一会话不丢失

Additional information you deem important (e.g. issue happens only occasionally):

Can you point out what caused this issue (optional)
多次回话时可能请求到不同的连接,造成session丢失。

Originally created by @fsea on GitHub (Aug 30, 2017). Original GitHub issue: https://github.com/fatedier/frp/issues/444 Issue is only used for submiting bug report and documents typo. If there are same issues or answers can be found in documents, we will close it directly. (为了节约时间,提高处理问题的效率,不按照格式填写的 issue 将会直接关闭。) Use the commands below to provide key information from your environment: You do NOT have to include this information if this is a FEATURE REQUEST **What version of frp are you using (./frpc -v or ./frps -v)?** v0.13.0 **What operating system and processor architecture are you using (`go env`)?** frps:Windows2012 frpc:linux **Configures you used:** ```ini # [common] is integral section [common] # A literal address or host name for IPv6 must be enclosed # in square brackets, as in "[::1]:80", "[ipv6-host]:http" or "[ipv6-host%zone]:80" bind_addr = 0.0.0.0 bind_port = 7000 # if you want to support virtual host, you must set the http port for listening (optional) vhost_http_port = 5000 vhost_https_port = 433 # if you want to configure or reload frps by dashboard, dashboard_port must be set dashboard_port = 7500 # dashboard user and pwd for basic auth protect, if not set, both default value is admin dashboard_user = admin dashboard_pwd = aaaaa # dashboard assets directory(only for debug mode) # assets_dir = ./static # console or real logFile path like ./frps.log log_file = ./frps.log # trace, debug, info, warn, error log_level = info log_max_days = 3 # privilege mode is the only supported mode since v0.10.0 privilege_token = xxxx # heartbeat configure, it's not recommended to modify the default value # the default value of heartbeat_timeout is 90 # heartbeat_timeout = 90 # only allow frpc to bind ports you list, if you set nothing, there won't be any limit privilege_allow_ports = 5000,7000,7500,50001 # pool_count in each proxy will change to max_pool_count if they exceed the maximum value max_pool_count = 255 # authentication_timeout means the timeout interval (seconds) when the frpc connects frps # if authentication_timeout is zero, the time is not verified, default is 900s authentication_timeout = 900 # if subdomain_host is not empty, you can set subdomain when type is http or https in frpc's configure file # when subdomain is test, the host used by routing is test.frps.com subdomain_host = gslan.com # if tcp stream multiplexing is used, default is true tcp_mux = true ``` **Steps to reproduce the issue:** 1.访问通过frp映射出来的网站 2.使用账号密码登录后台 3. **Describe the results you received:** 经常性的丢失session。造成登录超时,被注销登录状态。 **Describe the results you expected:** 保存session,同一会话不丢失 **Additional information you deem important (e.g. issue happens only occasionally):** **Can you point out what caused this issue (optional)** 多次回话时可能请求到不同的连接,造成session丢失。
Author
Owner

@fatedier commented on GitHub (Aug 30, 2017):

没有理解和 frp 的关系是什么?

frp 的作用就是帮助你和内网的某个服务之间建立一个连接,至于这个连接是做什么并不关心,也不会修改这里面的数据。理论上和你在内网直接访问这个服务没有区别。

如果仍然有问题,最好能提供一个简单的可在本地复现的方法,方便排查问题。

<!-- gh-comment-id:326006191 --> @fatedier commented on GitHub (Aug 30, 2017): 没有理解和 frp 的关系是什么? frp 的作用就是帮助你和内网的某个服务之间建立一个连接,至于这个连接是做什么并不关心,也不会修改这里面的数据。理论上和你在内网直接访问这个服务没有区别。 如果仍然有问题,最好能提供一个简单的可在本地复现的方法,方便排查问题。
Author
Owner

@fsea commented on GitHub (Sep 15, 2017):

多次会话时可能请求到不同的连接,造成session丢失。

<!-- gh-comment-id:329648404 --> @fsea commented on GitHub (Sep 15, 2017): 多次会话时可能请求到不同的连接,造成session丢失。
Author
Owner

@KagurazakaNyaa commented on GitHub (Sep 17, 2017):

你的意思是重开一个浏览器标签可能会请求到一个新建的链接吗?但是我记得session应该是使用一个短时的cookies来保存session的ID的,所以应该是没有这个问题,建议你检查你自己的代码是否有问题,可以尝试写一个demo来测试session的工作情况

<!-- gh-comment-id:330057414 --> @KagurazakaNyaa commented on GitHub (Sep 17, 2017): 你的意思是重开一个浏览器标签可能会请求到一个新建的链接吗?但是我记得session应该是使用一个短时的cookies来保存session的ID的,所以应该是没有这个问题,建议你检查你自己的代码是否有问题,可以尝试写一个demo来测试session的工作情况
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#337
No description provided.