Skip to content
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

[Feature Request] Specify source interface for the client #3376

Open
1 of 11 tasks
alimdi opened this issue Mar 28, 2023 · 10 comments
Open
1 of 11 tasks

[Feature Request] Specify source interface for the client #3376

alimdi opened this issue Mar 28, 2023 · 10 comments
Assignees
Labels

Comments

@alimdi
Copy link

alimdi commented Mar 28, 2023

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
@blizard863
Copy link
Collaborator

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

@alimdi
Copy link
Author

alimdi commented 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

@blizard863
Copy link
Collaborator

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

@alimdi
Copy link
Author

alimdi commented Mar 30, 2023

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

@mecorpking
Copy link

@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

@alimdi
Copy link
Author

alimdi commented 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...

@mecorpking
Copy link

@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 =

@alimdi
Copy link
Author

alimdi commented May 3, 2023

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

@mecorpking
Copy link

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

@alimdi
Copy link
Author

alimdi commented 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 up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants