forked from fatedier/frp
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request fatedier#188 from fatedier/dev
bump version to 0.9.0
- Loading branch information
Showing
56 changed files
with
5,926 additions
and
190 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Dockerfile | ||
.git | ||
*~ | ||
*# | ||
.#* |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,8 +3,8 @@ language: go | |
|
||
go: | ||
- 1.5.4 | ||
- 1.6.3 | ||
- 1.7rc6 | ||
- 1.6.4 | ||
- 1.7.4 | ||
|
||
install: | ||
- make | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
FROM golang:1.6 | ||
|
||
COPY . /go/src/github.com/fatedier/frp | ||
|
||
RUN cd /go/src/github.com/fatedier/frp \ | ||
&& make \ | ||
&& mv bin/frpc /frpc \ | ||
&& mv bin/frps /frps \ | ||
&& mv conf/frpc_min.ini /frpc.ini \ | ||
&& mv conf/frps_min.ini /frps.ini \ | ||
&& make clean | ||
|
||
WORKDIR / | ||
|
||
EXPOSE 80 443 6000 7000 7500 | ||
|
||
ENTRYPOINT ["/frps"] |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
FROM alpine:3.4 | ||
|
||
COPY bin/frpc /frpc | ||
COPY bin/frps /frps | ||
COPY conf/frpc_min.ini /frpc.ini | ||
COPY conf/frps_min.ini /frps.ini | ||
|
||
WORKDIR / | ||
|
||
EXPOSE 80 443 6000 7000 7500 | ||
|
||
ENTRYPOINT ["/frps"] |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,26 +10,35 @@ frp is a fast reverse proxy to help you expose a local server behind a NAT or fi | |
|
||
## Catalog | ||
|
||
<!-- vim-markdown-toc GFM --> | ||
* [What can I do with frp?](#what-can-i-do-with-frp) | ||
* [Status](#status) | ||
* [Architecture](#architecture) | ||
* [Example Usage](#example-usage) | ||
* [Communicate with your computer in LAN by SSH](#communicate-with-your-computer-in-lan-by-ssh) | ||
* [Visit your web service in LAN by custom domains](#visit-your-web-service-in-lan-by-custom-domains) | ||
* [Communicate with your computer in LAN by SSH](#communicate-with-your-computer-in-lan-by-ssh) | ||
* [Visit your web service in LAN by custom domains](#visit-your-web-service-in-lan-by-custom-domains) | ||
* [Forward DNS query request](#forward-dns-query-request) | ||
* [Features](#features) | ||
* [Dashboard](#dashboard) | ||
* [Authentication](#authentication) | ||
* [Encryption and Compression](#encryption-and-compression) | ||
* [Reload configures without frps stopped](#reload-configures-without-frps-stopped) | ||
* [Privilege Mode](#privilege-mode) | ||
* [Port White List](#port-white-list) | ||
* [Connection Pool](#connection-pool) | ||
* [Rewriting the Host Header](#rewriting-the-host-header) | ||
* [Dashboard](#dashboard) | ||
* [Authentication](#authentication) | ||
* [Encryption and Compression](#encryption-and-compression) | ||
* [Reload configures without frps stopped](#reload-configures-without-frps-stopped) | ||
* [Privilege Mode](#privilege-mode) | ||
* [Port White List](#port-white-list) | ||
* [Connection Pool](#connection-pool) | ||
* [Rewriting the Host Header](#rewriting-the-host-header) | ||
* [Password protecting your web service](#password-protecting-your-web-service) | ||
* [Custom subdomain names](#custom-subdomain-names) | ||
* [Connect frps by HTTP PROXY](#connect-frps-by-http-proxy) | ||
* [Development Plan](#development-plan) | ||
* [Contributing](#contributing) | ||
* [Donation](#donation) | ||
* [AliPay](#alipay) | ||
* [Paypal](#paypal) | ||
* [Contributors](#contributors) | ||
|
||
<!-- vim-markdown-toc --> | ||
|
||
## What can I do with frp? | ||
|
||
* Expose any http and https service behind a NAT or firewall to the internet by a server with public IP address(Name-based Virtual Host Support). | ||
|
@@ -82,6 +91,8 @@ Put **frpc** and **frpc.ini** to your server in LAN. | |
auth_token = 123 | ||
|
||
[ssh] | ||
type = tcp | ||
local_ip = 127.0.0.1 | ||
local_port = 22 | ||
``` | ||
|
||
|
@@ -139,6 +150,48 @@ Howerver, we can expose a http or https service using frp. | |
|
||
6. Now visit your local web service using url `http://www.yourdomain.com:8080`. | ||
|
||
### Forward DNS query request | ||
|
||
1. Modify frps.ini, configure a reverse proxy named [dns]: | ||
|
||
```ini | ||
# frps.ini | ||
[common] | ||
bind_port = 7000 | ||
|
||
[dns] | ||
type = udp | ||
listen_port = 6000 | ||
auth_token = 123 | ||
``` | ||
|
||
2. Start frps: | ||
|
||
`./frps -c ./frps.ini` | ||
|
||
3. Modify frpc.ini, set remote frps's server IP as x.x.x.x, forward dns query request to google dns server `8.8.8.8:53`: | ||
|
||
```ini | ||
# frpc.ini | ||
[common] | ||
server_addr = x.x.x.x | ||
server_port = 7000 | ||
auth_token = 123 | ||
|
||
[dns] | ||
type = udp | ||
local_ip = 8.8.8.8 | ||
local_port = 53 | ||
``` | ||
|
||
4. Start frpc: | ||
|
||
`./frpc -c ./frpc.ini` | ||
|
||
5. Send dns query request by dig: | ||
|
||
`dig @x.x.x.x -p 6000 www.goolge.com` | ||
|
||
## Features | ||
|
||
### Dashboard | ||
|
@@ -150,9 +203,12 @@ Configure a port for dashboard to enable this feature: | |
```ini | ||
[common] | ||
dashboard_port = 7500 | ||
# dashboard's username and password are both optional,if not set, default is admin. | ||
dashboard_user = admin | ||
dashboard_pwd = admin | ||
``` | ||
|
||
Then visit `http://[server_addr]:7500` to see dashboard. | ||
Then visit `http://[server_addr]:7500` to see dashboard, default username and password are both `admin`. | ||
|
||
![dashboard](/doc/pic/dashboard.png) | ||
|
||
|
@@ -164,6 +220,8 @@ Client that want's to register must set a global `auth_token` equals to frps.ini | |
|
||
Note that time duration bewtween frpc and frps mustn't exceed 15 minutes because timestamp is used for authentication. | ||
|
||
Howerver, this timeout duration can be modified by setting `authentication_timeout` in frps's configure file. It's defalut value is 900, means 15 minutes. If it is equals 0, then frps will not check authentication timeout. | ||
|
||
### Encryption and Compression | ||
|
||
Defalut value is false, you could decide if the proxy will use encryption or compression whether the type is: | ||
|
@@ -311,11 +369,67 @@ host_header_rewrite = dev.yourdomain.com | |
|
||
If `host_header_rewrite` is specified, the Host header will be rewritten to match the hostname portion of the forwarding address. | ||
|
||
### Password protecting your web service | ||
|
||
Anyone who can guess your tunnel URL can access your local web server unless you protect it with a password. | ||
|
||
This enforces HTTP Basic Auth on all requests with the username and password you specify in frpc's configure file. | ||
|
||
It can be only enabled when proxy type is http. | ||
|
||
```ini | ||
# frpc.ini | ||
[web] | ||
privilege_mode = true | ||
type = http | ||
local_port = 80 | ||
custom_domains = test.yourdomain.com | ||
http_user = abc | ||
http_pwd = abc | ||
``` | ||
|
||
Visit `test.yourdomain.com` and now you need to input username and password. | ||
|
||
### Custom subdomain names | ||
|
||
It is convenient to use `subdomain` configure for http、https type when many people use one frps server together. | ||
|
||
```ini | ||
# frps.ini | ||
subdomain_host = frps.com | ||
``` | ||
|
||
Resolve `*.frps.com` to the frps server's IP. | ||
|
||
```ini | ||
# frpc.ini | ||
[web] | ||
privilege_mode = true | ||
type = http | ||
local_port = 80 | ||
subdomain = test | ||
``` | ||
|
||
Now you can visit your web service by host `test.frps.com`. | ||
|
||
Note that if `subdomain_host` is not empty, `custom_domains` should not be the subdomain of `subdomain_host`. | ||
|
||
### Connect frps by HTTP PROXY | ||
|
||
frpc can connect frps using HTTP PROXY if you set os environment `HTTP_PROXY` or configure `http_proxy` param in frpc.ini file. | ||
|
||
```ini | ||
# frpc.ini | ||
server_addr = x.x.x.x | ||
server_port = 7000 | ||
http_proxy = http://user:[email protected]:8080 | ||
``` | ||
|
||
## Development Plan | ||
|
||
* Support udp protocol. | ||
* Support wildcard domain name. | ||
* Url router. | ||
* Log http request information in frps. | ||
* Direct reverse proxy, like haproxy. | ||
* Load balance to different service in frpc. | ||
* Debug mode for frpc, prestent proxy status in terminal. | ||
* Inspect all http requests/responses that are transmitted over the tunnel. | ||
|
@@ -327,7 +441,9 @@ If `host_header_rewrite` is specified, the Host header will be rewritten to matc | |
|
||
Interested in getting involved? We would like to help you! | ||
|
||
* Take a look at our [issues list](https://github.com/fatedier/frp/issues) and consider submitting a patch | ||
* Take a look at our [issues list](https://github.com/fatedier/frp/issues) and consider sending a Pull Request to **dev branch**. | ||
* If you want to add a new feature, please create an issue first to describe the new feature, as well as the implementation approach. Once a proposal is accepted, create an implementation of the new features and submit it as a pull request. | ||
* Sorry for my poor english and improvement for this document is welcome even some typo fix. | ||
* If you have some wanderful ideas, send email to [email protected]. | ||
|
||
**Note: We prefer you to give your advise in [issues](https://github.com/fatedier/frp/issues), so others with a same question can search it quickly and we don't need to answer them repeatly.** | ||
|
@@ -348,5 +464,8 @@ Donate money by [paypal](https://www.paypal.me/fatedier) to my account **fatedie | |
|
||
* [fatedier](https://github.com/fatedier) | ||
* [Hurricanezwf](https://github.com/Hurricanezwf) | ||
* [vashstorm](https://github.com/vashstorm) | ||
* [maodanp](https://github.com/maodanp) | ||
* [Pan Hao](https://github.com/vashstorm) | ||
* [Danping Mao](https://github.com/maodanp) | ||
* [Eric Larssen](https://github.com/ericlarssen) | ||
* [Damon Zhao](https://github.com/se77en) | ||
* [Manfred Touron](https://github.com/moul) |
Oops, something went wrong.