mirror of
https://github.com/fatedier/frp.git
synced 2026-05-15 16:15:49 -06:00
[GH-ISSUE #2904] [Question] HTTPS-Proxy ... BAD GATEWAY message in Browser #2314
Labels
No labels
In Progress
WIP
WaitingForInfo
bug
doc
duplicate
easy
enhancement
future
help wanted
invalid
lifecycle/stale
need-issue-template
need-usage-help
no plan
proposal
pull-request
question
todo
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/frp#2314
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ikarstein on GitHub (Apr 20, 2022).
Original GitHub issue: https://github.com/fatedier/frp/issues/2904
Describe the feature request
Hi all,
I have a question regarding the configuration of FRPS/FRPC...
"Outside" my LAN I have a Debian VM with a public IP (v4). Inside my LAN I have a Windows machine.
On the Windows machine I run an ASP.NET app on IIS with HTTPS and SNI. This is all running.
I want to access this ASP.NET app from the internet. Also via HTTPS.
I started FRPS on the Debian VM and added "vhost_https_port=443" to the frps.ini
On the Windows machine I added this to frsc.ini:
[web01]
type = https
local_ip = 127.0.0.1
local_port = 443
use_encryption = false
use_compression = true
custom_domains = myapp.example.com
proxy_protocol_version = v2
frpc starts without problems and connects to frps (on the Debian VM).
On a third machine (Windows) I added an entry to the HOSTS file for "myapp.example.com" for the public IP of the Debian machine (FRPS).
When I try to access http://myapp.example.com I see the request on the Debian machine (FRPS) but in the browser (on the third machine) I get an error "ERR_CONNECTION_CLOSED".
What do I miss here? I cannot find my mistake.
Thank you all!
Regards
Ingo
@ikarstein commented on GitHub (Apr 20, 2022):
Now I found the plugin "https2https"
I changed the config:
[web01]
type = https
#local_ip = 127.0.0.1
#local_port = 443
use_encryption = false
use_compression = false
custom_domains = myapp.example.com
proxy_protocol_version = v2
plugin = https2https
plugin_local_addr = 127.0.0.1:443
plugin_crt_path = c:\ssl\myapp.example.com.crt
plugin_key_path = c:\ssl\myapp.example.com.key
plugin_host_header_rewrite = myapp.example.com
plugin_header_X-From-Where = frp
On the third machine I use the browser to access https://myapp.example.com.
Now I get a 502 "Bad Gateway" error.
@fatedier commented on GitHub (Apr 21, 2022):
Why you set
proxy_protocol_version = v2?@ikarstein commented on GitHub (Apr 21, 2022):
Thank you for your answer!
... because I saw it in a sample config. I already tried it without this line.
@ikarstein commented on GitHub (Apr 21, 2022):
The current (and also not working) config is:
As you can see I added TLS for the connection between FRPC and FRPS. The handshake seems to be okay.
On FRPC machine I get this log message:
2022/04/20 23:41:11 [D] [proxy.go:784] [XXXXXXXXXXXXXXXX] [web01] handle by plugin: https2httpWithout a "s" behind the second "http" in the plugin name... Is that correct?
@fatedier commented on GitHub (Apr 21, 2022):
You can try your original configs:
@ikarstein commented on GitHub (Apr 21, 2022):
This was my first approach.
...But now it works !!!
I am confused. I still had that first configuration at the end of my
FRPC.INI file.
THANK YOU!