Skip to content

[Feature Request] http_proxy plugin fails to bind to specific local bindAddr for multi-IP egress #5027

@teimur8

Description

@teimur8

Describe the feature request

Okay, here is a GitHub issue draft detailing the problem you encountered with binding the http_proxy plugin to multiple specific IP addresses when using an older version of frp.

GitHub Issue Draft
Title
http_proxy plugin fails to bind to specific local bindAddr in older versions (e.g., v0.45.0) for multi-IP egress

Body
Description
When attempting to configure the http_proxy client plugin to bind to a specific local IP address using bindAddr (to enforce source IP for proxy traffic) on a machine with multiple network interfaces, the frpc client fails to start and throws an unmarshal error.

This issue appears to be due to the bindAddr key not being recognized as a valid field within ClientPluginOptions in older frp versions.

Environment
frpc Version: e.g., v0.45.0 (or any version prior to v0.46.0/v0.50.0)

frps Version: (Specify your server version, or leave blank)

OS (frpc): Ubuntu Linux (Multi-IP setup)

OS (frps): (Specify your server OS)

Steps to Reproduce
Configure an frpc client on a machine with two local IP addresses (e.g., 192.168.1.10 and 192.168.1.11).

Use the following configuration in frpc.toml, attempting to bind the http_proxy plugin to specific local IPs using the bindAddr parameter:

Ini, TOML

frpc.toml

[[proxies]]
name = "plugin_http_proxy_ip_a"
type = "tcp"
remotePort = 6004
[proxies.plugin]
type = "http_proxy"

Attempting to bind to the first local IP

bindAddr = "192.168.1.10"
httpUser = "user_a"
httpPassword = "password_a"

[[proxies]]
name = "plugin_http_proxy_ip_b"
type = "tcp"
remotePort = 6005
[proxies.plugin]
type = "http_proxy"

Attempting to bind to the second local IP

bindAddr = "192.168.1.11"
httpUser = "user_b"
httpPassword = "password_b"
Run the frpc client: ./frpc -c frpc.toml

Expected Behavior
The frpc client should start successfully, and the http_proxy plugin instances should bind locally to the specified bindAddr for outbound proxy traffic.

Actual Behavior
The frpc client fails immediately with the following error:

unmarshal ProxyConfig error: unmarshal ClientPluginOptions error: json: unknown field "bindAddr"
Potential Solution / Workaround
The bindAddr option within [proxies.plugin] appears to have been introduced in a later version of frp.

Workaround for older versions: To achieve source IP separation on older versions, users are forced to rely on Linux Policy-Based Routing (PBR) by running separate frpc processes under different user IDs, which is significantly more complex than the simple configuration option.

Resolution: If this feature was added in a specific version (e.g., v0.46.0 or v0.50.0), please confirm the first version that supports bindAddr within the client plugin configuration to help users facing this error on multi-IP systems.

Thank you.

Describe alternatives you've considered

No response

Affected area

  • Docs
  • Installation
  • Performance and Scalability
  • Security
  • User Experience
  • Test and Release
  • Developer Infrastructure
  • Client Plugin
  • Server Plugin
  • Extensions
  • Others

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions