update readme

This commit is contained in:
Recolic Keghart 2019-08-30 20:50:18 +08:00
parent 134a46c00b
commit 24f0d78f7b
No known key found for this signature in database
GPG Key ID: 6CB5593C34BABC37
3 changed files with 136 additions and 0 deletions

View File

@ -16,6 +16,10 @@ Now it also try to support p2p connect.
* [Status](#status)
* [Architecture](#architecture)
* [Installation](#installation)
* [Build from source](#build-from-source)
* [Package Manager](#package-manager)
* [Docker](#docker)
* [Example Usage](#example-usage)
* [Access your computer in LAN by SSH](#access-your-computer-in-lan-by-ssh)
* [Visit your web service in LAN by custom domains](#visit-your-web-service-in-lan-by-custom-domains)
@ -53,6 +57,7 @@ Now it also try to support p2p connect.
* [Connect frps by HTTP PROXY](#connect-frps-by-http-proxy)
* [Range ports mapping](#range-ports-mapping)
* [Plugin](#plugin)
* [FAQ](#faq)
* [Development Plan](#development-plan)
* [Contributing](#contributing)
* [Donation](#donation)
@ -72,6 +77,62 @@ frp is under development and you can try it with latest release version. Master
![architecture](/doc/pic/architecture.png)
## Installation
### Build from source
- Build Dependency
Golang 1.9+, GNU Make, Git
- Build with Go >= 1.12
```bash
# If you're outside China GFW
GO111MODULE=on make
# If you're inside China GFW
GOPROXY=https://goproxy.io GO111MODULE=on make
```
- Bulid with Go < 1.12 (Not maintained)
```bash
GOPATH="$HOME/go"
mkdir -p "$GOPATH/src/github.com/fatedier" &&
git clone https://github.com/fatedier/frp "$GOPATH/src/github.com/fatedier/frp" &&
cd "$GOPATH/src/github.com/fatedier/frp" &&
make # Use graftcp or VPN if you are in China.
```
- Install
```bash
cp bin/frp* /usr/bin/ &&
mkdir -p /etc/frp &&
cp conf/*.ini /etc/frp/ &&
cp conf/systemd/*.service /etc/systemd/system/
```
### Package Manager
- Arch Linux
Use your favorite package manager to install the package directly. [AUR:frps](https://aur.archlinux.org/packages/frps), [AUR:frpc](https://aur.archlinux.org/packages/frpc). For example:
```bash
pakku -S frpc frps
```
- Linuxbrew
```bash
brew install frpc frps
```
### Docker
Please refer to [Docker HUB](https://hub.docker.com/r/fatedier/frp).
## Example Usage
Firstly, download the latest programs from [Release](https://github.com/fatedier/frp/releases) page according to your os and arch.
@ -811,6 +872,13 @@ plugin_http_passwd = abc
`plugin_http_user` and `plugin_http_passwd` are configuration parameters used in `http_proxy` plugin.
## FAQ
- read error: message type error
The version of build-time dependency `github.com/fatedier/golib` is incorrect. Latest version of this library is incompatible with frp. Try to clean your GOHOME (Both system-wide and user-wide) and re-build the program. You can also download a pre-built binary for your platform directly.
## Development Plan
* Log http request information in frps.

View File

@ -12,6 +12,10 @@ frp 是一个可用于内网穿透的高性能的反向代理应用,支持 tcp
* [开发状态](#开发状态)
* [架构](#架构)
* [安装指南](#安装指南)
* [从源码构建](#从源码构建)
* [使用包管理器](#使用包管理器)
* [Docker](docker)
* [使用示例](#使用示例)
* [通过 ssh 访问公司内网机器](#通过-ssh-访问公司内网机器)
* [通过自定义域名访问部署于内网的 web 服务](#通过自定义域名访问部署于内网的-web-服务)
@ -71,6 +75,62 @@ master 分支用于发布稳定版本dev 分支用于开发,您可以尝试
![architecture](/doc/pic/architecture.png)
## 安装指南
### 从源码构建
- 编译时依赖
Golang 1.9+, GNU Make, Git
- Go版本 >= 1.12
```bash
# If you're outside China GFW
GO111MODULE=on make
# If you're inside China GFW
GOPROXY=https://goproxy.io GO111MODULE=on make
```
- Go版本 < 1.12 (不被支持)
```bash
GOPATH="$HOME/go"
mkdir -p "$GOPATH/src/github.com/fatedier" &&
git clone https://github.com/fatedier/frp "$GOPATH/src/github.com/fatedier/frp" &&
cd "$GOPATH/src/github.com/fatedier/frp" &&
make # Use graftcp or VPN if you are in China.
```
- 安装
```bash
cp bin/frp* /usr/bin/ &&
mkdir -p /etc/frp &&
cp conf/*.ini /etc/frp/ &&
cp conf/systemd/*.service /etc/systemd/system/
```
### 使用包管理器
- Arch Linux
使用你喜欢的包管理器来直接安装此软件. [AUR:frps](https://aur.archlinux.org/packages/frps), [AUR:frpc](https://aur.archlinux.org/packages/frpc). 举例:
```bash
pakku -S frpc frps
```
- Linuxbrew
```bash
brew install frpc frps
```
### Docker
请查阅[Docker HUB](https://hub.docker.com/r/fatedier/frp).
## 使用示例
根据对应的操作系统及架构,从 [Release](https://github.com/fatedier/frp/releases) 页面下载最新版本的程序。
@ -860,6 +920,12 @@ plugin_http_passwd = abc
`plugin_http_user``plugin_http_passwd` 即为 `http_proxy` 插件可选的配置参数。
## FAQ
- read error: message type error
编译时依赖`github.com/fatedier/golib`的版本不正确。最新版本的这个库看起来并不兼容frp。请尝试清理你的GOHOME并重新编译。或者建议从RELEASE中直接下载预编译的二进制文件。
## 开发计划
计划在后续版本中加入的功能与优化,排名不分先后,如果有其他功能建议欢迎在 [issues](https://github.com/fatedier/frp/issues) 中反馈。

View File

@ -1,3 +1,5 @@
#!/bin/bash
# compile for version
make
if [ $? -ne 0 ]; then