mirror of
https://github.com/fatedier/frp.git
synced 2026-05-15 08:05:49 -06:00
[GH-ISSUE #3316] changing from http to tcp - failed send request from another pod in the pubic server #2657
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#2657
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 @zaalgol on GitHub (Feb 16, 2023).
Original GitHub issue: https://github.com/fatedier/frp/issues/3316
Bug Description
(It is worth emphasizing that I opened a similar issue in the past, and it was not resolved
But since then I have made a reduction of the components involved, so the issue is also clearer. I clodes the old issue)
In our application, we create a frp tunnel from the local-server to the public server, so the public server can send data to the local-server. In the config we defined the type to be http, and defined a domain.
The public server sits in a kubernetes cluster. The frp sits in one container, and I send a request from another container to the local server via the frp
curl -i -H "Host: <GENERATED SECRET>.<RAW SUB DOMAIN>" -H "Upgrade: websocket" -H "Connection: Upgrade" http://<KUBERNETES CLUSTER-IP OF FRP CONTAINER IN PUBLIC SERVER>:8080/<REQUEST>It works great.
We have a customer that wants to add his private proxy, that all data from public server to local-server should pass through it. Because frp supports http_proxy only with type=tcp, as a beginning I changed config to type=tcp, but because the type=tpc doesn’t support domains, I get a error in the public server frp:
[http.go:92] do http proxy request error: no such domain: <GENERATED SECRET>.<RAW SUB DOMAIN> <request>I also tried with port 8081:
curl -i -H "Host: <GENERATED SECRET>.<RAW SUB DOMAIN>" -H "Upgrade: websocket" -H "Connection: Upgrade" http://<KUBERNETES CLUSTER-IP OF FRP CONTAINER IN PUBLIC SERVER>:8081/<REQUEST>But it just gets a timeout, and even not passed to the frp pod.
frpc Version
0.35.1
frps Version
0.35.1
System Architecture
linux VM on a cloud. public server in kubernetes. local server in docker compose
Configurations
frp.ini :
frps.ini:
Logs
with type = http:
logs of local server frp:
logs of public server frp pod:
With type = tcp:
logs of local server frp:
logs of public server frp pod:
running curl with port 8080 as before:
curl -i -H "Host: <GENERATED SECRET>.<RAW SUB DOMAIN>" -H "Upgrade: websocket" -H "Connection: Upgrade" http://<KUBERNETES CLUSTER-IP OF FRP CONTAINER IN PUBLIC SERVER>:8080/<REQUEST>result in public server frp:
[http.go:92] do http proxy request error: no such domain: <GENERATED SECRET> <request>running with port 8001 as remote_port:
curl -i -H "Host: <GENERATED SECRET>.<RAW SUB DOMAIN>" -H "Upgrade: websocket" -H "Connection: Upgrade" http://<KUBERNETES CLUSTER-IP OF FRP CONTAINER IN PUBLIC SERVER>:8081/<REQUEST>result in the pod I ran the curl command:
curl: (7) Failed to connect to <KUBERNETES CLUSTER-IP OF FRP CONTAINER IN PUBLIC SERVER> port 8081: Connection timed outThe request doesn't passes to the frp pod.
Steps to reproduce
...
Affected area
@fatedier commented on GitHub (Feb 17, 2023):
https://github.com/fatedier/frp#access-your-computer-in-lan-by-ssh
Connect remote port for
tcp.@zaalgol commented on GitHub (Feb 17, 2023):
Thanks @fatedier for your answer.
I tried it before. I ran
curl -i -H "Host: <GENERATED SECRET>.<RAW SUB DOMAIN>" -H "Upgrade: websocket" -H "Connection: Upgrade" http://<KUBERNETES CLUSTER-IP OF FRP CONTAINER IN PUBLIC SERVER>:8081/<REQUEST>But it just gets a timeout, and even not passed to the frp pod.
curl: (7) Failed to connect to <KUBERNETES CLUSTER-IP OF FRP CONTAINER IN PUBLIC SERVER> port 8081: Connection timed outI Will update the issue to contain this solution attempt.
@zaalgol commented on GitHub (Feb 17, 2023):
I fixed the issue.
for type = tcp, I replaced the cluster ip if the public server frp in the curl, with the container ip of public server frp, and it works with port 8080.