Last active
June 23, 2017 00:01
-
-
Save zhfish/c13df1b3ace50bfb1ba34a7db380bbfb to your computer and use it in GitHub Desktop.
frp config
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #/etc/nginx/conf.d/frp.conf | |
| server { | |
| listen 80; | |
| server_name *.tunnel.frp.com; | |
| charset utf-8; | |
| location / { | |
| proxy_set_header X-Real-IP $remote_addr; | |
| proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
| proxy_set_header X-Forwarded-Proto $scheme; | |
| proxy_set_header Host $http_host; | |
| proxy_pass http://127.0.0.1:7080; | |
| } | |
| client_max_body_size 60M; | |
| client_body_buffer_size 512k; | |
| access_log off; | |
| error_log off; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #/etc/systemd/system/frp.service | |
| [Unit] | |
| Description=frp | |
| After=network.target | |
| [Service] | |
| Type=simple | |
| PIDFile=/run/frp.pid | |
| ExecStart=/usr/local/frp/frps -c /usr/local/frp/frps.ini | |
| ExecReload=/bin/kill -s HUP $MAINPID | |
| ExecStop=/bin/kill -s QUIT $MAINPID | |
| Restart=on-failure | |
| [Install] | |
| WantedBy=multi-user.target |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [common] | |
| server_addr = 8.8.8.8 | |
| server_port = 7000 | |
| privilege_token = token | |
| vhost_http_port = 7080 | |
| [a] | |
| type = http | |
| local_port = 2564 | |
| privilege_mode = true | |
| auth_token = a.tunnel.frp.com; | |
| custom_domains = a.tunnel.frp.com; | |
| host_header_rewrite = localhost |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [common] | |
| bind_addr = 0.0.0.0 | |
| bind_port = 7000 | |
| dashboard_port = 7070 | |
| vhost_http_port = 7080 | |
| privilege_mode = true | |
| privilege_token = token |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment