https://github.com/nyu-rts/frp-auth-plugin
FRP server plugin to handle authentication
https://github.com/nyu-rts/frp-auth-plugin
frp proxy tunnel
Last synced: about 1 month ago
JSON representation
FRP server plugin to handle authentication
- Host: GitHub
- URL: https://github.com/nyu-rts/frp-auth-plugin
- Owner: NYU-RTS
- License: bsd-3-clause
- Created: 2024-10-11T18:36:41.000Z (almost 2 years ago)
- Default Branch: trunk
- Last Pushed: 2025-03-05T20:59:48.000Z (over 1 year ago)
- Last Synced: 2025-03-19T23:48:29.362Z (over 1 year ago)
- Topics: frp, proxy, tunnel
- Language: Go
- Homepage:
- Size: 28.3 KB
- Stars: 1
- Watchers: 8
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Auth server plugin for frp
This allows you to have multiple clients, each with a specific username and password, that can only create specific proxies. The configuration of the proxies is controlled by the server rather than the client.
Example `frp-auth.json`:
```yaml
users:
frpc1:
password: "1234"
proxies:
service1:
customDomains: ["service1.127-0-0-1.nip.io", "service.127-0-0-1.nip.io"]
httpUser: "enduser"
httpPassword: "hackme"
service2:
customDomains: ["service2.example.org"]
httpUser: "example"
httpPassword: {{ .Envs.EXAMPLE_PASSWORD | quote }} # Go template is enabled
```
Run frp-auth-plugin like so:
```
FRP_AUTH_PLUGIN_LISTEN_ADDR=:8080 ./frp-auth-plugin frp-auth.json
```
Example `frps.yaml`:
```yaml
bindPort: 8000
vhostHTTPPort: 8000
httpPlugins:
- name: "auth"
addr: "127.0.0.1:8080" # Point to frp-auth-plugin
path: "/handler"
ops:
- Login
- NewProxy
```
Example `frpc.yaml`:
```yaml
serverAddr: 127.0.0.1
serverPort: 8001
transport:
protocol: websocket
heartbeatInterval: 10
heartbeatTimeout: 30
# Match the credentials here
user: "frpc1"
metadatas:
token: "1234"
proxies:
# Match the service name here
- name: service1
type: http
# Local destination
localIp: 127.0.0.1
localPort: 3000
# You don't have to set this, and it will be overwritten if you do
#customDomains:
# - service1.127-0-0-1.nip.io
#httpUser: enduser
#httpPassword: hackme
```