Skip to content

Commit

Permalink
Merge pull request fatedier#1637 from fatedier/dev
Browse files Browse the repository at this point in the history
bump version to v0.31.2
  • Loading branch information
fatedier authored Feb 4, 2020
2 parents f480160 + 69fa7ed commit 487c8d7
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions README_zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -546,10 +546,10 @@ allow_ports = 2000-3000,3001,3003,4000-50000
type = tcp
local_port = 22
remote_port = 6000
bandwith_limit = 1MB
bandwidth_limit = 1MB
```

在代理配置中增加 `bandwith_limit` 字段启用此功能,目前仅支持 `MB``KB` 单位。
在代理配置中增加 `bandwidth_limit` 字段启用此功能,目前仅支持 `MB``KB` 单位。

### TCP 多路复用

Expand Down
10 changes: 5 additions & 5 deletions client/proxy/proxy_wrapper.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ func (pw *ProxyWrapper) SetRunningStatus(remoteAddr string, respErr string) erro
}

if err := pw.pxy.Run(); err != nil {
pw.close()
pw.Status = ProxyStatusStartErr
pw.Err = err.Error()
pw.lastStartErr = time.Now()
Expand Down Expand Up @@ -140,7 +141,10 @@ func (pw *ProxyWrapper) Stop() {
pw.monitor.Stop()
}
pw.Status = ProxyStatusClosed
pw.close()
}

func (pw *ProxyWrapper) close() {
pw.handler(event.EvCloseProxy, &event.CloseProxyPayload{
CloseProxyMsg: &msg.CloseProxy{
ProxyName: pw.Name,
Expand Down Expand Up @@ -178,11 +182,7 @@ func (pw *ProxyWrapper) checkWorker() {
} else {
pw.mu.Lock()
if pw.Status == ProxyStatusRunning || pw.Status == ProxyStatusWaitStart {
pw.handler(event.EvCloseProxy, &event.CloseProxyPayload{
CloseProxyMsg: &msg.CloseProxy{
ProxyName: pw.Name,
},
})
pw.close()
xl.Trace("change status from [%s] to [%s]", pw.Status, ProxyStatusCheckFailed)
pw.Status = ProxyStatusCheckFailed
}
Expand Down
4 changes: 2 additions & 2 deletions conf/frpc_full.ini
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ meta_var2 = 234
type = tcp
local_ip = 127.0.0.1
local_port = 22
# limit bandwith for this proxy, unit is KB and MB
bandwith_limit = 1MB
# limit bandwidth for this proxy, unit is KB and MB
bandwidth_limit = 1MB
# true or false, if true, messages between frps and frpc will be encrypted, default is false
use_encryption = false
# if true, message will be compressed
Expand Down
2 changes: 1 addition & 1 deletion utils/version/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (
"strings"
)

var version string = "0.31.1"
var version string = "0.31.2"

func Full() string {
return version
Expand Down
2 changes: 1 addition & 1 deletion utils/vhost/resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const (
</style>
</head>
<body>
<h1>The page you visit not found.</h1>
<h1>The page you requested was not found.</h1>
<p>Sorry, the page you are looking for is currently unavailable.<br/>
Please try again later.</p>
<p>The server is powered by <a href="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/fatedier/frp">frp</a>.</p>
Expand Down

0 comments on commit 487c8d7

Please sign in to comment.