[GH-ISSUE #3376] [Feature Request] Specify source interface for the client #2702

Open
opened 2026-05-05 13:44:26 -06:00 by gitea-mirror · 10 comments
Owner

Originally created by @alimdi on GitHub (Mar 28, 2023).
Original GitHub issue: https://github.com/fatedier/frp/issues/3376

Originally assigned to: @blizard863 on GitHub.

Describe the feature request

Hi,

Is it possible to specify the source interface to use on the client side ?

Regards,

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
Originally created by @alimdi on GitHub (Mar 28, 2023). Original GitHub issue: https://github.com/fatedier/frp/issues/3376 Originally assigned to: @blizard863 on GitHub. ### Describe the feature request Hi, Is it possible to specify the source interface to use on the client side ? Regards, ### 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 - [X] Others
gitea-mirror added the
proposal
label 2026-05-05 13:44:26 -06:00
Author
Owner

@blizard863 commented on GitHub (Mar 29, 2023):

Can you describe more detail ?
How to specify and why ?

<!-- gh-comment-id:1488674738 --> @blizard863 commented on GitHub (Mar 29, 2023): Can you describe more detail ? How to specify and why ?
Author
Owner

@alimdi commented on GitHub (Mar 30, 2023):

Hi,

Can you describe more detail ? How to specify and why ?

Sure, I meant is it possible to make the client use a specific network interface when connecting to the server in case of having multiple network interfaces.
Hope that makes the request more clear

<!-- gh-comment-id:1489945325 --> @alimdi commented on GitHub (Mar 30, 2023): Hi, > Can you describe more detail ? How to specify and why ? Sure, I meant is it possible to make the client use a specific network interface when connecting to the server in case of having multiple network interfaces. Hope that makes the request more clear
Author
Owner

@blizard863 commented on GitHub (Mar 30, 2023):

I got it. @alimdi

I think the connect_server_local_ip arg will match your demand ?

https://github.com/fatedier/frp/blob/dev/conf/frpc_full.ini#L104

<!-- gh-comment-id:1490157200 --> @blizard863 commented on GitHub (Mar 30, 2023): I got it. @alimdi I think the connect_server_local_ip arg will match your demand ? https://github.com/fatedier/frp/blob/dev/conf/frpc_full.ini#L104
Author
Owner

@alimdi commented on GitHub (Mar 30, 2023):

That's definetly what I was looking for.
Thank you @blizard863

<!-- gh-comment-id:1490167178 --> @alimdi commented on GitHub (Mar 30, 2023): That's definetly what I was looking for. Thank you @blizard863
Author
Owner

@mecorpking commented on GitHub (May 2, 2023):

@alimdi is this worked for you? i am looking for the same with http_proxy plugin and using the below config
[http_proxy]
type = tcp
connect_server_local_ip = 192.168.10.100
remote_port = 24002
plugin = http_proxy
plugin_http_user =
plugin_http_passwd =

but it still providing my default network

<!-- gh-comment-id:1532044081 --> @mecorpking commented on GitHub (May 2, 2023): @alimdi is this worked for you? i am looking for the same with http_proxy plugin and using the below config [http_proxy] type = tcp connect_server_local_ip = 192.168.10.100 remote_port = 24002 plugin = http_proxy plugin_http_user = plugin_http_passwd = but it still providing my default network
Author
Owner

@alimdi commented on GitHub (May 3, 2023):

@mecorpking It is working but I've defined connect_server_local_ip in [common] scope not in [http_proxy]
Give it a shot...

<!-- gh-comment-id:1533332928 --> @alimdi commented on GitHub (May 3, 2023): @mecorpking It is working but I've defined connect_server_local_ip in [common] scope not in [http_proxy] Give it a shot...
Author
Owner

@mecorpking commented on GitHub (May 3, 2023):

@alimdi i tried with that also but received " login to server failed: i/o deadline reached". if possible can you share sample frps.ini and frpc.ini , below is my sample file

server_addr = 1.2.3.4 /sample
server_port = 2000
token = 12345678
log_file = ./connection.log
protocol = tcp
connect_server_local_ip = 192.168.10.100
tcp_mux = true

[http_proxy]
type = tcp
remote_port = 24003
plugin = http_proxy
plugin_http_user =
plugin_http_passwd =

<!-- gh-comment-id:1533339900 --> @mecorpking commented on GitHub (May 3, 2023): @alimdi i tried with that also but received " login to server failed: i/o deadline reached". if possible can you share sample frps.ini and frpc.ini , below is my sample file server_addr = 1.2.3.4 /sample server_port = 2000 token = 12345678 log_file = ./connection.log protocol = tcp connect_server_local_ip = 192.168.10.100 tcp_mux = true [http_proxy] type = tcp remote_port = 24003 plugin = http_proxy plugin_http_user = plugin_http_passwd =
Author
Owner

@alimdi commented on GitHub (May 3, 2023):

I'm not using http_proxy
Have you tried to check if the interface were used with tcpdump ?

<!-- gh-comment-id:1533347791 --> @alimdi commented on GitHub (May 3, 2023): I'm not using http_proxy Have you tried to check if the interface were used with tcpdump ?
Author
Owner

@mecorpking commented on GitHub (May 3, 2023):

i think there is some issue with my frps config if you could share, it will help alot

<!-- gh-comment-id:1533355778 --> @mecorpking commented on GitHub (May 3, 2023): i think there is some issue with my frps config if you could share, it will help alot
Author
Owner

@alimdi commented on GitHub (May 3, 2023):

frpc :

[common]
server_addr = 100.100.100.100
server_port = 7000
log_file = /var/log/frpc.log
log_level = info
log_max_days = 3
disable_log_color = false
authenticate_heartbeats = true
authenticate_new_work_conns = true
token = 123456
authentication_method = token
admin_addr = 127.0.0.1
admin_port = 7400
admin_user = admin
admin_pwd = secure-password
pool_count = 5
login_fail_exit = true
protocol = tcp
connect_server_local_ip = 192.168.1.1
tls_enable = false
udp_packet_size = 1500
disable_custom_tls_first_byte = false
pprof_enable = false
[ssh]
type = tcp
local_ip = 127.0.0.1
local_port = 22
remote_port = 2222

frps :

[common]
bind_addr = 100.100.100.100
bind_port = 7000
bind_udp_port = 7001
kcp_bind_port = 7000
dashboard_addr = 100.100.100.100
dashboard_port = 7500
dashboard_user = admin
dashboard_pwd = secure-password
dashboard_tls_mode = false
enable_prometheus = true
log_file = /var/log/frps.log
log_level = info
log_max_days = 3
disable_log_color = false
detailed_errors_to_client = true
authentication_method = token
authenticate_heartbeats = true
authenticate_new_work_conns = true
token = 123456
oidc_issuer =
oidc_audience =
oidc_skip_expiry_check = false
oidc_skip_issuer_check = false
allow_ports = 2222
max_pool_count = 5
max_ports_per_client = 0
tls_only = false
udp_packet_size = 1500
pprof_enable = false
<!-- gh-comment-id:1533374152 --> @alimdi commented on GitHub (May 3, 2023): frpc : ``` [common] server_addr = 100.100.100.100 server_port = 7000 log_file = /var/log/frpc.log log_level = info log_max_days = 3 disable_log_color = false authenticate_heartbeats = true authenticate_new_work_conns = true token = 123456 authentication_method = token admin_addr = 127.0.0.1 admin_port = 7400 admin_user = admin admin_pwd = secure-password pool_count = 5 login_fail_exit = true protocol = tcp connect_server_local_ip = 192.168.1.1 tls_enable = false udp_packet_size = 1500 disable_custom_tls_first_byte = false pprof_enable = false [ssh] type = tcp local_ip = 127.0.0.1 local_port = 22 remote_port = 2222 ``` frps : ``` [common] bind_addr = 100.100.100.100 bind_port = 7000 bind_udp_port = 7001 kcp_bind_port = 7000 dashboard_addr = 100.100.100.100 dashboard_port = 7500 dashboard_user = admin dashboard_pwd = secure-password dashboard_tls_mode = false enable_prometheus = true log_file = /var/log/frps.log log_level = info log_max_days = 3 disable_log_color = false detailed_errors_to_client = true authentication_method = token authenticate_heartbeats = true authenticate_new_work_conns = true token = 123456 oidc_issuer = oidc_audience = oidc_skip_expiry_check = false oidc_skip_issuer_check = false allow_ports = 2222 max_pool_count = 5 max_ports_per_client = 0 tls_only = false udp_packet_size = 1500 pprof_enable = false ```
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#2702
No description provided.