[GH-ISSUE #4617] Failed to connect when trying to forward RealIP for a SSH proxy #3644

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

Originally created by @AlexCai26 on GitHub (Jan 2, 2025).
Original GitHub issue: https://github.com/fatedier/frp/issues/4617

Bug Description

It's an attempt to forward RealIP for a SSH Proxy.

Following the posts on https://github.com/fatedier/frp/issues/3903, i tried the proxy config block below:

[[proxies]]
name = "ssh-aws-us-to-asus"
type = "tcp"
# 
localIP = "127.0.0.1"
localPort = 22
# 
remotePort = 18810
# 
transport.useEncryption = true
# 
transport.useCompression = true
# Forward Real IP to local
transport.proxyProtocolVersion = "v2"

The last line leads to the errors below when trying to connect the proxy:

# Via MobaXTerm
Incoming packet was garbled on decryption

# Via CMD on Windows
# `ssh username@43.134.111.111 --port 18810`
Bad packet length 1231976033.
ssh_dispatch_run_fatal: Connection to 43.134.111.111 port 18810: message authentication code incorrect

Before the adding of the last line, the connection/the SSH proxy can be established/works.

Could you please provide some advises on this ?

frpc Version

0.61.1

frps Version

0.61.1

System Architecture

linux/amd64

Configurations

1.fprs config:

bindPort = 18700
auth.token = "J5Mv1cUQZFMN1111"
quicBindPort = 18800
transport.maxPoolCount = 5

2.fprc config:

serverAddr = "43.134.111.111"
serverPort = 8800
transport.protocol = "quic"
transport.poolCount = 2
auth.token = "J5Mv1cUQZFMN1111"

[[proxies]]
name = "ssh-aws-us-to-asus"
type = "tcp"
localIP = "127.0.0.1"
localPort = 22
remotePort = 18810
transport.useEncryption = true
transport.useCompression = true
# Forward Real IP to local
transport.proxyProtocolVersion = "v2"

Logs

No response

Steps to reproduce

...

Affected area

  • Docs
  • Installation
  • Performance and Scalability
  • Security
  • User Experience
  • Test and Release
  • Developer Infrastructure
  • Client Plugin
  • Server Plugin
  • Extensions
  • Others
Originally created by @AlexCai26 on GitHub (Jan 2, 2025). Original GitHub issue: https://github.com/fatedier/frp/issues/4617 ### Bug Description It's an attempt to forward RealIP for a SSH Proxy. Following the posts on https://github.com/fatedier/frp/issues/3903, i tried the proxy config block below: ```bash [[proxies]] name = "ssh-aws-us-to-asus" type = "tcp" # localIP = "127.0.0.1" localPort = 22 # remotePort = 18810 # transport.useEncryption = true # transport.useCompression = true # Forward Real IP to local transport.proxyProtocolVersion = "v2" ``` The last line leads to the errors below when trying to connect the proxy: ```bash # Via MobaXTerm Incoming packet was garbled on decryption # Via CMD on Windows # `ssh username@43.134.111.111 --port 18810` Bad packet length 1231976033. ssh_dispatch_run_fatal: Connection to 43.134.111.111 port 18810: message authentication code incorrect ``` Before the adding of the last line, the connection/the SSH proxy can be established/works. Could you please provide some advises on this ? ### frpc Version 0.61.1 ### frps Version 0.61.1 ### System Architecture linux/amd64 ### Configurations # 1.fprs config: ```bash bindPort = 18700 auth.token = "J5Mv1cUQZFMN1111" quicBindPort = 18800 transport.maxPoolCount = 5 ``` # 2.fprc config: ```bash serverAddr = "43.134.111.111" serverPort = 8800 transport.protocol = "quic" transport.poolCount = 2 auth.token = "J5Mv1cUQZFMN1111" [[proxies]] name = "ssh-aws-us-to-asus" type = "tcp" localIP = "127.0.0.1" localPort = 22 remotePort = 18810 transport.useEncryption = true transport.useCompression = true # Forward Real IP to local transport.proxyProtocolVersion = "v2" ``` ### Logs _No response_ ### Steps to reproduce 1. 2. 3. ... ### Affected area - [ ] Docs - [ ] Installation - [ ] Performance and Scalability - [ ] Security - [ ] User Experience - [ ] Test and Release - [ ] Developer Infrastructure - [ ] Client Plugin - [ ] Server Plugin - [ ] Extensions - [ ] Others
gitea-mirror 2026-05-05 14:20:24 -06:00
Author
Owner

@fatedier commented on GitHub (Jan 3, 2025):

https://github.com/fatedier/frp/issues/3903#issuecomment-2568556381

<!-- gh-comment-id:2568614872 --> @fatedier commented on GitHub (Jan 3, 2025): https://github.com/fatedier/frp/issues/3903#issuecomment-2568556381
Author
Owner

@github-actions[bot] commented on GitHub (Jan 18, 2025):

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

<!-- gh-comment-id:2599416373 --> @github-actions[bot] commented on GitHub (Jan 18, 2025): Issues go stale after 14d of inactivity. Stale issues rot after an additional 3d 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#3644
No description provided.