bit_kitchen.frps
ansible-role-frp
This role helps you install and set up the frp client or server on Windows, Linux, or OpenWrt.
To install, use:
ansible-galaxy install bit_kitchen.frpc
ansible-galaxy install bit_kitchen.frps
Requirements
None.
Role Variables
For frpc (client)
Variable | Required/Optional | Default | Description |
---|---|---|---|
frpc_version | Optional | (undefined) | Version of frp to install. Defaults to the latest version. |
frpc_config_name | Optional | (undefined) | Name of the frpc config file and service. |
frpc_config_file | Optional | (undefined) | Local config file to copy to the remote server. |
frpc_server_addr | Optional | 127.0.0.1 |
Address of the frp server. |
frpc_server_port | Optional | 7000 |
Port of the frp server. |
frpc_token | Optional | (undefined) | Token for authentication if set on the server. |
frpc_http_proxy | Optional | (undefined) | Proxy for connections to the frp server. |
For frps (server)
Variable | Required/Optional | Default | Description |
---|---|---|---|
frps_version | Optional | (undefined) | Version of frp to install. Defaults to the latest version. |
frps_config_name | Optional | (undefined) | Name of the frps config file and service. |
frps_config_file | Optional | (undefined) | Local config file to copy to the remote server. |
frps_bind_addr | Optional | 0.0.0.0 |
Address to bind for frps. Listens on all interfaces by default. |
frps_bind_port | Optional | 7000 |
Port to bind for frps. |
frps_token | Optional | (undefined) | Token for authentication. |
Dependencies
bit_kitchen.nssm
: (For Windows only) Needed to create services.gekmihesg.openwrt
: (For OpenWrt only) Supports OpenWrt without Python.kewlfft.aur
: (For Arch Linux only) Used for AUR support.
Example Playbook
Install and configure frp with default settings
- hosts: servers
roles:
- bit_kitchen.frps
- hosts: clients
roles:
- bit_kitchen.frpc
Use existing config files
- hosts: servers
roles:
- role: bit_kitchen.frps
frps_config_file: /path/to/my/frps.ini
- hosts: clients
roles:
- role: bit_kitchen.frpc
frpc_config_file: /path/to/my/frpc.ini
Use specific variables for installation
- hosts: servers
roles:
- role: bit_kitchen.frps
frps_bind_port: 7000
frps_token: MySecretToken
- hosts: clients
roles:
- role: bit_kitchen.frpc
frpc_server_addr: frp.example.com
frpc_token: MySecretToken
Install and configure two frp instances
- hosts: servers
roles:
- role: bit_kitchen.frps
frps_config_name: server1
frps_config_file: /path/to/my/frps-1.ini
- role: bit_kitchen.frps
frps_config_name: server2
frps_config_file: /path/to/my/frps-2.ini
- hosts: clients
roles:
- role: bit_kitchen.frpc
frpc_config_name: client1
frpc_config_file: /path/to/my/frpc-1.ini
- role: bit_kitchen.frpc
frpc_config_name: client2
frpc_config_file: /path/to/my/frpc-2.ini
License
Author Information
Installa
ansible-galaxy install bit_kitchen.frps
Licenza
Unknown
Download
153
Proprietario