Skip to content

not routing local http server with ssh command #4744

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
2 of 11 tasks
itsKV opened this issue Apr 6, 2025 · 1 comment
Open
2 of 11 tasks

not routing local http server with ssh command #4744

itsKV opened this issue Apr 6, 2025 · 1 comment

Comments

@itsKV
Copy link

itsKV commented Apr 6, 2025

Bug Description

I am using ssh gateway of frps to proxy local server to frps. Following is the ssh command I am executing on local machine...

ssh -R :8080:localhost:80 sub.domain.tld -p 2200 http --proxy_name proxy -t 12345678 -u user --custom_domain random

I can confirm that domain dns configuration is correct as random.sub.domain.tld is replying frp's default 404 error while accessing random proxy. Otherwise, that would trigger my web-server's default 404 error file. When I try to access the url, I am getting following error in frps log file

[httputil/reverseproxy.go:486] do http proxy request [host: random.sub.domain.tld:8080] error: no route found: random.sub.domain.tld:8080 /

And I am not getting any traffic on web server of local machine. Server log says that. That means frp is not hitting my local web server which I am trying to proxy onto frps using frpc

Also, is there any exhaustive list of ssh switches frps is using? I couldn't find all the switches in available documentations. Also, --help show very few switches to use with frps

frpc Version

0.61.2

frps Version

0.61.2

System Architecture

linux/arm64

Configurations

#frps.toml
bindAddr = "0.0.0.0"
bindPort = 1777
kcpBindPort = 1777

webServer.addr = "127.0.0.1"
webServer.port = 7500
webServer.user = "adm"
webServer.password = "adm"
webServer.pprofEnable = true

vhostHTTPPort = 8080

auth.method = "token"
auth.token = "12345678"

subDomainHost = "sub.domain.tld"

sshTunnelGateway.bindPort = 2200

Logs

No response

Steps to reproduce

  1. Run any http web server on client machine.
  2. Run ssh command as shown in the description.
  3. Try accessing url from third machine using any web browser.
    ...

Affected area

  • Docs
  • Installation
  • Performance and Scalability
  • Security
  • User Experience
  • Test and Release
  • Developer Infrastructure
  • Client Plugin
  • Server Plugin
  • Extensions
  • Others
@itsKV
Copy link
Author

itsKV commented Apr 12, 2025

Additionally, after starting proxy from client, running curl random.localhost:8080 directly on server also giving same output. Following is the frps log.

2025-04-12 08:47:41.410 [W] [httputil/reverseproxy.go:486] do http proxy request [host: test-http.localhost:8080] error: no route found: test-http.localhost /

Using same config via frpc client works well and that can server web file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant