[GH-ISSUE #4485] 自动定向到http而非https的问题 #3546

Closed
opened 2026-05-05 14:16:43 -06:00 by gitea-mirror · 2 comments
Owner

Originally created by @jfang2048 on GitHub (Oct 12, 2024).
Original GitHub issue: https://github.com/fatedier/frp/issues/4485

Bug Description

内网部署了某页面,在内网能且只能基于http访问,域名和IP都行

目前已经将他映射出去,为了方便和安全性,通过某公网地址的48080端口可以https访问,且只能https(用的https2http)

但是如果在外部的浏览器直接输入公网IP地址或者域名,他老是先自动定向到http,然后说无法访问,手动加个s,也就是https就可以了。

另外,这个页面对应内网和公网的域名是不一样的

frpc Version

frp_0.60.0_linux_amd64

frps Version

0.60.0

System Architecture

ArchLinux

Configurations

frpc.toml 对应配置

[[proxies]]
name = "mine_https2http"
type = "https"
customDomains = ["mine.test"]
[proxies.plugin]
type = "https2http"
localAddr = "192.168.9.30:80"
crtPath = "./certificate/mine.test"
keyPath = "./certificate/mine.test"

# frps.toml 

bindAddr = "192.168.9.109"
bindPort = 7244

vhostHTTPSPort = 48080

transport.tls.keyFile = "./certificate/frps.key"
transport.tls.certFile = "./certificate/frps.crt"
transport.tls.trustedCaFile = "./certificate/ca.crt"


auth.token = "..."

log.to = "/.../frps.log"
log.level = "info"
log.maxDays = 7

allowPorts = [
  { single = 7244 },
  { single = 48080 },
  { start = 43000, end = 49000 }
]

请问我需要添加什么配置或者变量吗?

以及,没有使用nginx和apache,希望只在frpc里解决这个问题。

Originally created by @jfang2048 on GitHub (Oct 12, 2024). Original GitHub issue: https://github.com/fatedier/frp/issues/4485 ### Bug Description 内网部署了某页面,在内网能且只能基于http访问,域名和IP都行 目前已经将他映射出去,为了方便和安全性,通过某公网地址的48080端口可以https访问,且只能https(用的https2http) 但是如果在外部的浏览器直接输入公网IP地址或者域名,他老是先自动定向到http,然后说无法访问,手动加个s,也就是https就可以了。 另外,这个页面对应内网和公网的域名是不一样的 ### frpc Version frp_0.60.0_linux_amd64 ### frps Version 0.60.0 ### System Architecture ArchLinux ### Configurations # frpc.toml 对应配置 ``` [[proxies]] name = "mine_https2http" type = "https" customDomains = ["mine.test"] [proxies.plugin] type = "https2http" localAddr = "192.168.9.30:80" crtPath = "./certificate/mine.test" keyPath = "./certificate/mine.test" ``` ``` # frps.toml bindAddr = "192.168.9.109" bindPort = 7244 vhostHTTPSPort = 48080 transport.tls.keyFile = "./certificate/frps.key" transport.tls.certFile = "./certificate/frps.crt" transport.tls.trustedCaFile = "./certificate/ca.crt" auth.token = "..." log.to = "/.../frps.log" log.level = "info" log.maxDays = 7 allowPorts = [ { single = 7244 }, { single = 48080 }, { start = 43000, end = 49000 } ] ``` 请问我需要添加什么配置或者变量吗? 以及,没有使用nginx和apache,希望只在frpc里解决这个问题。
gitea-mirror 2026-05-05 14:16:43 -06:00
Author
Owner

@jfang2048 commented on GitHub (Oct 16, 2024):

请问有人有答案吗,还是必须上nginx?

<!-- gh-comment-id:2415570411 --> @jfang2048 commented on GitHub (Oct 16, 2024): 请问有人有答案吗,还是必须上nginx?
Author
Owner

@github-actions[bot] commented on GitHub (Nov 7, 2024):

Issues go stale after 21d of inactivity. Stale issues rot after an additional 7d of inactivity and eventually close.

<!-- gh-comment-id:2461082748 --> @github-actions[bot] commented on GitHub (Nov 7, 2024): Issues go stale after 21d of inactivity. Stale issues rot after an additional 7d of inactivity and eventually close.
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#3546
No description provided.