Skip to content

Commit

Permalink
Merge pull request #1000 from fatedier/dev
Browse files Browse the repository at this point in the history
bump version to v0.22.0
  • Loading branch information
fatedier authored Dec 9, 2018
2 parents 66a69f8 + 4f0ee59 commit d5ce4d4
Show file tree
Hide file tree
Showing 58 changed files with 2,796 additions and 3,850 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ language: go

go:
- 1.10.x
- 1.11.x

install:
- make
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile_multiple_build
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.8 as frpBuild
FROM golang:1.10 as frpBuild

COPY . /go/src/github.com/fatedier/frp

Expand Down
83 changes: 77 additions & 6 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Gopkg.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@

[[constraint]]
name = "github.com/fatedier/golib"
branch = "master"
revision = "ff8cd814b04901d617b7fffaca6fedb81067821d"

[[constraint]]
branch = "frp"
Expand Down
20 changes: 7 additions & 13 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,24 +26,18 @@ frpc:
test: gotest

gotest:
go test -v ./assets/...
go test -v ./client/...
go test -v ./cmd/...
go test -v ./models/...
go test -v ./server/...
go test -v ./utils/...
go test -v --cover ./assets/...
go test -v --cover ./client/...
go test -v --cover ./cmd/...
go test -v --cover ./models/...
go test -v --cover ./server/...
go test -v --cover ./utils/...

ci:
cd ./tests && ./run_test.sh && cd -
go test -v ./tests/...
cd ./tests && ./clean_test.sh && cd -

cic:
cd ./tests && ./clean_test.sh && cd -
go test -count=1 -p=1 -v ./tests/...

alltest: gotest ci

clean:
rm -f ./bin/frpc
rm -f ./bin/frps
cd ./tests && ./clean_test.sh && cd -
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

## What is frp?

frp is a fast reverse proxy to help you expose a local server behind a NAT or firewall to the internet. Now, it supports tcp, udp, http and https protocol when requests can be forwarded by domains to backward web services.
frp is a fast reverse proxy to help you expose a local server behind a NAT or firewall to the internet. As of now, it supports tcp & udp, as well as http and https protocols, where requests can be forwarded to internal services by domain name.

## Table of Contents

Expand Down Expand Up @@ -566,7 +566,7 @@ type = http
local_port = 80
custom_domains = test.yourdomain.com
http_user = abc
http_passwd = abc
http_pwd = abc
```
Visit `http://test.yourdomain.com` and now you need to input username and password.
Expand Down
4 changes: 2 additions & 2 deletions README_zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -518,7 +518,7 @@ tcp_mux = false
目前只支持 tcp 类型的 proxy。

```ini
# fprc.ini
# frpc.ini
[test1]
type = tcp
local_port = 8080
Expand Down Expand Up @@ -619,7 +619,7 @@ local_port = 80
subdomain = test
```

frps 和 fprc 都启动成功后,通过 `test.frps.com` 就可以访问到内网的 web 服务。
frps 和 frpc 都启动成功后,通过 `test.frps.com` 就可以访问到内网的 web 服务。

需要注意的是如果 frps 配置了 `subdomain_host`,则 `custom_domains` 中不能是属于 `subdomain_host` 的子域名或者泛域名。

Expand Down
7 changes: 4 additions & 3 deletions client/admin_api.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import (

ini "github.com/vaughan0/go-ini"

"github.com/fatedier/frp/client/proxy"
"github.com/fatedier/frp/g"
"github.com/fatedier/frp/models/config"
"github.com/fatedier/frp/utils/log"
Expand Down Expand Up @@ -77,15 +78,15 @@ func (svr *Service) apiReload(w http.ResponseWriter, r *http.Request) {
return
}

pxyCfgs, visitorCfgs, err := config.LoadProxyConfFromIni(g.GlbClientCfg.User, conf, newCommonCfg.Start)
pxyCfgs, visitorCfgs, err := config.LoadAllConfFromIni(g.GlbClientCfg.User, conf, newCommonCfg.Start)
if err != nil {
res.Code = 3
res.Msg = err.Error()
log.Error("reload frpc proxy config error: %v", err)
return
}

err = svr.ctl.reloadConf(pxyCfgs, visitorCfgs)
err = svr.ctl.ReloadConf(pxyCfgs, visitorCfgs)
if err != nil {
res.Code = 4
res.Msg = err.Error()
Expand Down Expand Up @@ -121,7 +122,7 @@ func (a ByProxyStatusResp) Len() int { return len(a) }
func (a ByProxyStatusResp) Swap(i, j int) { a[i], a[j] = a[j], a[i] }
func (a ByProxyStatusResp) Less(i, j int) bool { return strings.Compare(a[i].Name, a[j].Name) < 0 }

func NewProxyStatusResp(status *ProxyStatus) ProxyStatusResp {
func NewProxyStatusResp(status *proxy.ProxyStatus) ProxyStatusResp {
psr := ProxyStatusResp{
Name: status.Name,
Type: status.Type,
Expand Down
Loading

0 comments on commit d5ce4d4

Please sign in to comment.