mirror of
https://github.com/fatedier/frp.git
synced 2026-05-15 08:05:49 -06:00
[GH-ISSUE #2778] [Feature Request] first API requirements #2223
Labels
No labels
In Progress
WIP
WaitingForInfo
bug
doc
duplicate
easy
enhancement
future
help wanted
invalid
lifecycle/stale
need-issue-template
need-usage-help
no plan
proposal
pull-request
question
todo
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/frp#2223
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @penguine on GitHub (Jan 24, 2022).
Original GitHub issue: https://github.com/fatedier/frp/issues/2778
Describe the feature request
API
The API wrapper gives access to all the frp-Client API methods:
const url = await frpc.connect();
const api = frpc.getApi();
Authtoken
const tunnels = await api.registerAuthtoken(token);
Reset Authtoken
const token = await api.resetAuthtoken();
List tunnels
const tunnels = await api.listTunnels();
Start tunnel
const tunnel = await api.startTunnel(opts);
Get tunnel details
const tunnel = await api.tunnelDetail(tunnelName);
Stop tunnel
await api.stopTunnel(tunnelName);
Set Auto Reload
await api.reload(true);
Reload once
await api.reloadIni(path); // if not set then load the actual file
later for the requests:
List requests
await api.listRequests(options);
Replay request
await api.replayRequest(requestId, tunnelName);
Delete all requests
await api.deleteAllRequests();
Request detail
const request = await api.requestDetail(requestId);
Disconnect Process
await frpc.disconnect(url); // stops one
await frpc.disconnect(); // stops all
await frpc.kill(); // kills frpc processes
@github-actions[bot] commented on GitHub (Feb 24, 2022):
Issues go stale after 30d of inactivity. Stale issues rot after an additional 7d of inactivity and eventually close.