[GH-ISSUE #1186] How to trigger events/notifications in frp server when it detected one of the client is offline? #928

Closed
opened 2026-05-05 12:35:25 -06:00 by gitea-mirror · 5 comments
Owner

Originally created by @jerrychong25 on GitHub (Apr 8, 2019).
Original GitHub issue: https://github.com/fatedier/frp/issues/1186

Hi,

Currently I have implemented frp communication between 5 clients and 1 server.

So far everythings are working fine.

However, I can't trigger events/notifications in frp server when it detected one of client is offline.

This is because I can only know the client is down when error displayed inside the logs.

So, how could I do to trigger events/notifications to another website/application so that I could display this error details and subsequently proceed backup action or etc?

Thanks.

Originally created by @jerrychong25 on GitHub (Apr 8, 2019). Original GitHub issue: https://github.com/fatedier/frp/issues/1186 Hi, Currently I have implemented frp communication between 5 clients and 1 server. So far everythings are working fine. However, I can't trigger events/notifications in frp server when it detected one of client is offline. This is because I can only know the client is down when error displayed inside the logs. So, how could I do to trigger events/notifications to another website/application so that I could display this error details and subsequently proceed backup action or etc? Thanks.
Author
Owner

@fatedier commented on GitHub (Apr 9, 2019):

frps support API for getting proxies status such as /api/proxy/tcp.

You can try to call this API at intervals to check proxies status and do what you want.

<!-- gh-comment-id:481071292 --> @fatedier commented on GitHub (Apr 9, 2019): frps support API for getting proxies status such as `/api/proxy/tcp`. You can try to call this API at intervals to check proxies status and do what you want.
Author
Owner

@jerrychong25 commented on GitHub (Apr 9, 2019):

frps support API for getting proxies status such as /api/proxy/tcp.

You can try to call this API at intervals to check proxies status and do what you want.

Any documentation on this API section?

For example:
My frps server domain name is http://example.com/

So I could check proxies status via http://example.com/api/proxy/tcp?

Thanks.

<!-- gh-comment-id:481099335 --> @jerrychong25 commented on GitHub (Apr 9, 2019): > frps support API for getting proxies status such as `/api/proxy/tcp`. > > You can try to call this API at intervals to check proxies status and do what you want. Any documentation on this API section? For example: My frps server domain name is **http://example.com/** So I could check proxies status via **http://example.com/api/proxy/tcp**? Thanks.
Author
Owner

@fatedier commented on GitHub (Apr 9, 2019):

You should set dashboard params to enable this feature.

# frps.ini
[common]
dashboard_addr = 0.0.0.0
dashboard_port = 7500

# dashboard user and passwd for basic auth protect, if not set, both default value is admin
dashboard_user = admin
dashboard_pwd = admin

The api is http://127.0.0.1:7500/api/proxy/tcp.

It's designed to display data on dashboard, no documentation now, maybe future.

<!-- gh-comment-id:481119827 --> @fatedier commented on GitHub (Apr 9, 2019): You should set dashboard params to enable this feature. ```ini # frps.ini [common] dashboard_addr = 0.0.0.0 dashboard_port = 7500 # dashboard user and passwd for basic auth protect, if not set, both default value is admin dashboard_user = admin dashboard_pwd = admin ``` The api is `http://127.0.0.1:7500/api/proxy/tcp`. It's designed to display data on dashboard, no documentation now, maybe future.
Author
Owner

@jerrychong25 commented on GitHub (Apr 9, 2019):

You should set dashboard params to enable this feature.

# frps.ini
[common]
dashboard_addr = 0.0.0.0
dashboard_port = 7500

# dashboard user and passwd for basic auth protect, if not set, both default value is admin
dashboard_user = admin
dashboard_pwd = admin

The api is http://127.0.0.1:7500/api/proxy/tcp.

It's designed to display data on dashboard, no documentation now, maybe future.

Tested it is working, and it returns JSON data for all my clients.

But how could I do the authentication step entered with username admin and password admin when calling this API from my application side?

In my PC, it would pop up a screen to prompt input of dashboard username and password. So I could enter these details myself. But impossible for my application to do this step.

<!-- gh-comment-id:481128732 --> @jerrychong25 commented on GitHub (Apr 9, 2019): > You should set dashboard params to enable this feature. > > ```ini > # frps.ini > [common] > dashboard_addr = 0.0.0.0 > dashboard_port = 7500 > > # dashboard user and passwd for basic auth protect, if not set, both default value is admin > dashboard_user = admin > dashboard_pwd = admin > ``` > > The api is `http://127.0.0.1:7500/api/proxy/tcp`. > > It's designed to display data on dashboard, no documentation now, maybe future. Tested it is working, and it returns JSON data for all my clients. But how could I do the authentication step entered with username **admin** and password **admin** when calling this API from my application side? In my PC, it would pop up a screen to prompt input of dashboard username and password. So I could enter these details myself. But impossible for my application to do this step.
Author
Owner

@fatedier commented on GitHub (Apr 9, 2019):

Try to search http basic auth for more details.

<!-- gh-comment-id:481130682 --> @fatedier commented on GitHub (Apr 9, 2019): Try to search `http basic auth` for more details.
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#928
No description provided.