mirror of
https://github.com/fatedier/frp.git
synced 2026-05-15 16:15:49 -06:00
[GH-ISSUE #2009] TLS when TLS is terminated before reaching server #1596
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#1596
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 @levavakian on GitHub (Sep 24, 2020).
Original GitHub issue: https://github.com/fatedier/frp/issues/2009
I might be trying to do something not supported, so feel free to close issue. I am trying to run the frp server in an aws ec2 instance with a network balancer handling the TLS termination and then forward to the frp server. If I set
tls_enableon the frp client I get[W] [service.go:102] login to server failed hello: connection write timeoutand if I don't set it I get[W] [service.go:102] login to server failed hello: i/o deadline reachedWhat version of frp are you using (./frpc -v or ./frps -v)?
0.34.0
What operating system and processor architecture are you using (
go env)?linux/amd64
Configures you used:
./frps --bind_port 443 --vhost_http_port 443
Steps to reproduce the issue:
Describe the results you received:
Connections through the tls terminated url do not succeed, but if I remove the tls termination everythign works fine.
Describe the results you expected:
TLS to be terminated at the network balancer and for the client and server to connect as if no tls was in place.
@limaofu commented on GitHub (Sep 25, 2020):
awsのLoad Balancing→Load Balances→choose target Load balnacer→Listeners→add listener and config ssl cert
@levavakian commented on GitHub (Sep 25, 2020):
@limaofu the aws load balancer already has an ssl cert, and I can visit the frps web page fine on the ssl secured page, it is the frp client that fails, presumably because the ssl is terminated at the load balancer and continues on as a non-ssl connection to the server.
@limaofu commented on GitHub (Sep 25, 2020):
I see, because the requested data was not HTTP protocol, so aws filtered it.,frpc only use tls
@limaofu commented on GitHub (Sep 25, 2020):
you may change the HTTPS:443 's Listener to N/A security policy,
just bypass through 443 port
@levavakian commented on GitHub (Sep 25, 2020):
The network balancer is set to be a tcp port. Here is the configuration for it in terraform:
The TCP only (non-TLS) alternative to this works great, so it is just the TLS termination that is causing issues as far as I can tell.
@levavakian commented on GitHub (Sep 25, 2020):
It looked like it was getting hung up on the yamux session open, so I tried setting
tcp_mux = falseon both server and client and now I get this error:login to server failed: EOFIt looks like it might be related to this issue https://github.com/fatedier/frp/issues/810 but I can't read the comments unfortunately.
@fatedier commented on GitHub (Sep 26, 2020):
@levavakian You can't do that now since frp use a wrapped TLS connection with custom first byte. AWS won't dectect it.
You can only use 4 layers load balancer.
@levavakian commented on GitHub (Sep 26, 2020):
@fatedier thank you for letting me know. I will try letting frp handle the ssl termination instead.