[GH-ISSUE #1927] Aderviser: frps add -list param #1528

Closed
opened 2026-05-05 12:57:58 -06:00 by gitea-mirror · 13 comments
Owner

Originally created by @banyet1 on GitHub (Aug 1, 2020).
Original GitHub issue: https://github.com/fatedier/frp/issues/1927

Hello,

FRP is a great work, thanks for your efforts.

Could you add a new feature in fprs to list all the client and port? If that so, we can use the list to do a lot of things, say, DNS auto-update, or send cmd to the client via shell scripts.

Ex: ./frps -list
8000:1.1.1.1:22
8001:1.1.1.2:23
...

Thanks.

Originally created by @banyet1 on GitHub (Aug 1, 2020). Original GitHub issue: https://github.com/fatedier/frp/issues/1927 Hello, FRP is a great work, thanks for your efforts. Could you add a new feature in fprs to list all the client and port? If that so, we can use the list to do a lot of things, say, DNS auto-update, or send cmd to the client via shell scripts. Ex: ./frps -list 8000:1.1.1.1:22 8001:1.1.1.2:23 ... Thanks.
Author
Owner

@Becods commented on GitHub (Aug 2, 2020):

Hello,

This is my personal opinion:

I think your idea can be implemented through Get Dashboard.

If you have a better way to implement it, welcome to pull requests.

<!-- gh-comment-id:667641617 --> @Becods commented on GitHub (Aug 2, 2020): Hello, This is my personal opinion: I think your idea can be implemented through Get Dashboard. If you have a better way to implement it, welcome to pull requests.
Author
Owner

@banyet1 commented on GitHub (Aug 2, 2020):

Hi,

Thanks for the reply, the Dashboard does not have any info about remote IP, I've double-checked. So I don't have clue but edit source code from square one.

<!-- gh-comment-id:667648985 --> @banyet1 commented on GitHub (Aug 2, 2020): Hi, Thanks for the reply, the Dashboard does not have any info about remote IP, I've double-checked. So I don't have clue but edit source code from square one.
Author
Owner

@Becods commented on GitHub (Aug 2, 2020):

All right,

Maybe I haven't used the dashboard for a long time.

You may be able to look at the TCP connections that make connections to FRPs.

I hope you will be successful.

<!-- gh-comment-id:667652215 --> @Becods commented on GitHub (Aug 2, 2020): All right, Maybe I haven't used the dashboard for a long time. You may be able to look at the TCP connections that make connections to FRPs. I hope you will be successful.
Author
Owner

@banyet1 commented on GitHub (Aug 2, 2020):

Hi,

Thanks for your replay.

The thing is if you've over 10+clients, so I don't think I can using netstat to identify every connection.

Btw: I think it's not so complicated that add current query connection.

Best.

<!-- gh-comment-id:667687017 --> @banyet1 commented on GitHub (Aug 2, 2020): Hi, Thanks for your replay. The thing is if you've over 10+clients, so I don't think I can using netstat to identify every connection. Btw: I think it's not so complicated that add current query connection. Best.
Author
Owner

@fatedier commented on GitHub (Aug 3, 2020):

Ex: ./frps -list
8000:1.1.1.1:22
8001:1.1.1.2:23

What's the meaning of ip above? Can you descibe more details about your usage scenarios?

<!-- gh-comment-id:667824972 --> @fatedier commented on GitHub (Aug 3, 2020): ``` Ex: ./frps -list 8000:1.1.1.1:22 8001:1.1.1.2:23 ``` What's the meaning of ip above? Can you descibe more details about your usage scenarios?
Author
Owner

@banyet1 commented on GitHub (Aug 3, 2020):

Hi,

In my case, I've lot of hosts who don't have the static IP address, so I using API update DNS automatically (nobody can remember over 10 IPs but domain names).

So I need to know the current IP and updating DNS automatically (because I know the remote port, so I can identify which domain name should mapping to what exactly IP address).

Best!

<!-- gh-comment-id:667932638 --> @banyet1 commented on GitHub (Aug 3, 2020): Hi, In my case, I've lot of hosts who don't have the static IP address, so I using API update DNS automatically (nobody can remember over 10 IPs but domain names). So I need to know the current IP and updating DNS automatically (because I know the remote port, so I can identify which domain name should mapping to what exactly IP address). Best!
Author
Owner

@banyet1 commented on GitHub (Aug 3, 2020):

btw:

Ex: ./frps -list
8000:1.1.1.1:22
8001:1.1.1.2:23

remoteport:remoteip:localport.

<!-- gh-comment-id:667933193 --> @banyet1 commented on GitHub (Aug 3, 2020): btw: Ex: ./frps -list 8000:1.1.1.1:22 8001:1.1.1.2:23 remoteport:remoteip:localport.
Author
Owner

@fatedier commented on GitHub (Aug 3, 2020):

What the meaning of remote-ip? IP of frpc?

Can you share your example configure files?

<!-- gh-comment-id:668050502 --> @fatedier commented on GitHub (Aug 3, 2020): What the meaning of `remote-ip`? IP of frpc? Can you share your example configure files?
Author
Owner

@banyet1 commented on GitHub (Aug 3, 2020):

Hi,

Sorry for the delay, here is a sample:
Client fc.ini:

[common]
server_addr = server_ip
server_port = 17000

[SSH]
type = tcp
local_ip = 127.0.0.1
local_port = 22
remote_port = 50000
use_encryption = true
use_compression = true


Server fs.ini:
[common]
bind_port = 17000
dashboard_port = 17500

dashboard_user = admin
dashboard_pwd = password

In this case, I do not know the client's IP (dynamic) only if ssh user@server_ip -p 50000 to logon and "netstat" to check it out. But the server knows which client's IP has been mapping to port 5000, so I need the server to tell me that client's IP without via SSH.


Ex: ./frps -list
50000:client_ip

I need this mapping table.

Thanks.

<!-- gh-comment-id:668067892 --> @banyet1 commented on GitHub (Aug 3, 2020): Hi, Sorry for the delay, here is a sample: Client fc.ini: [common] server_addr = server_ip server_port = 17000 [SSH] type = tcp local_ip = 127.0.0.1 local_port = 22 remote_port = 50000 use_encryption = true use_compression = true --------------------------- Server fs.ini: [common] bind_port = 17000 dashboard_port = 17500 dashboard_user = admin dashboard_pwd = password In this case, I do not know the client's IP (dynamic) only if ssh user@server_ip -p 50000 to logon and "netstat" to check it out. But the server knows which client's IP has been mapping to port 5000, so I need the server to tell me that client's IP without via SSH. ---------------------- Ex: ./frps -list 50000:client_ip I need this mapping table. Thanks.
Author
Owner

@fatedier commented on GitHub (Aug 4, 2020):

frp don't care about clinet's IP. Machines running frpc are usually behind the NAT without public IP.

You'd better try DDNS?

<!-- gh-comment-id:668400049 --> @fatedier commented on GitHub (Aug 4, 2020): frp don't care about clinet's IP. Machines running frpc are usually behind the NAT without public IP. You'd better try DDNS?
Author
Owner

@banyet1 commented on GitHub (Aug 4, 2020):

Hi,

The thing is I did have ddns running on NAT host to update DNS(crontab every 30mins), but I want the frps update DNS instead, because if the NAT's IP has changed, the frps will know it at first.

That's more efficient than running ddns on NAT host, that's why I need frps to tell me the IP and port mapping list.

Best.

<!-- gh-comment-id:668403197 --> @banyet1 commented on GitHub (Aug 4, 2020): Hi, The thing is I did have ddns running on NAT host to update DNS(crontab every 30mins), but I want the frps update DNS instead, because if the NAT's IP has changed, the frps will know it at first. That's more efficient than running ddns on NAT host, that's why I need frps to tell me the IP and port mapping list. Best.
Author
Owner

@fatedier commented on GitHub (Aug 4, 2020):

It's not the scenario supported by frp.

If you use DDNS,your machines are not behind the NAT and have public IPs. You maybe search for other DDNS projects to solve your problem or just write more reliable scripts.

<!-- gh-comment-id:668409274 --> @fatedier commented on GitHub (Aug 4, 2020): It's not the scenario supported by frp. If you use DDNS,your machines are not behind the NAT and have public IPs. You maybe search for other DDNS projects to solve your problem or just write more reliable scripts.
Author
Owner

@banyet1 commented on GitHub (Aug 4, 2020):

Hi,

Let me be as clear as possible I can, sorry for some misunderstandings.

The NAT host doesn't have public IP, but the gw has public IP. The frpc running on NAT host connect from gw to frps, and the gw has it's own public IP(PPPOE), it's usually the way the frps works (from frps connect through gw's public IP to NAT host) .

And I'm using commercial DNS API (Godaddy) to update DNS resolver, not some DDNS program.

<!-- gh-comment-id:668413082 --> @banyet1 commented on GitHub (Aug 4, 2020): Hi, Let me be as clear as possible I can, sorry for some misunderstandings. The NAT host doesn't have public IP, but the gw has public IP. The frpc running on NAT host connect from gw to frps, and the gw has it's own public IP(PPPOE), it's usually the way the frps works (from frps connect through gw's public IP to NAT host) . And I'm using commercial DNS API (Godaddy) to update DNS resolver, not some DDNS program.
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#1528
No description provided.