Skip to content

Commit

Permalink
Merge pull request fatedier#735 from fatedier/dev
Browse files Browse the repository at this point in the history
bump version to v0.18.0
  • Loading branch information
fatedier authored May 2, 2018
2 parents 371c401 + 853892f commit c008b14
Show file tree
Hide file tree
Showing 35 changed files with 3,590 additions and 1,760 deletions.
8 changes: 4 additions & 4 deletions client/control.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ import (
"sync"
"time"

"github.com/xtaci/smux"

"github.com/fatedier/frp/g"
"github.com/fatedier/frp/models/config"
"github.com/fatedier/frp/models/msg"
Expand All @@ -32,6 +30,8 @@ import (
"github.com/fatedier/frp/utils/shutdown"
"github.com/fatedier/frp/utils/util"
"github.com/fatedier/frp/utils/version"

fmux "github.com/hashicorp/yamux"
)

const (
Expand All @@ -51,7 +51,7 @@ type Control struct {
conn frpNet.Conn

// tcp stream multiplexing, if enabled
session *smux.Session
session *fmux.Session

// put a message in this channel to send it over control connection to server
sendCh chan (msg.Message)
Expand Down Expand Up @@ -198,7 +198,7 @@ func (ctl *Control) login() (err error) {
}()

if g.GlbClientCfg.TcpMux {
session, errRet := smux.Client(conn, nil)
session, errRet := fmux.Client(conn, nil)
if errRet != nil {
return errRet
}
Expand Down
26 changes: 22 additions & 4 deletions cmd/frps/root.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
// Copyright 2018 fatedier, [email protected]
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package main

import (
Expand Down Expand Up @@ -82,13 +96,17 @@ var rootCmd = &cobra.Command{
return nil
}

var err error
if cfgFile != "" {
parseServerCommonCfg(CfgFileTypeIni, cfgFile)
err = parseServerCommonCfg(CfgFileTypeIni, cfgFile)
} else {
parseServerCommonCfg(CfgFileTypeCmd, "")
err = parseServerCommonCfg(CfgFileTypeCmd, "")
}
if err != nil {
return err
}

err := runServer()
err = runServer()
if err != nil {
fmt.Println(err)
os.Exit(1)
Expand All @@ -113,7 +131,7 @@ func parseServerCommonCfg(fileType int, filePath string) (err error) {
return
}

g.GlbServerCfg.CfgFile = cfgFile
g.GlbServerCfg.CfgFile = filePath

err = g.GlbServerCfg.ServerCommonConf.Check()
if err != nil {
Expand Down
10 changes: 5 additions & 5 deletions glide.lock

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

5 changes: 3 additions & 2 deletions glide.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@ import:
- sm4
- package: github.com/vaughan0/go-ini
version: a98ad7ee00ec53921f08832bc06ecf7fd600e6a1
- package: github.com/xtaci/smux
version: 2de5471dfcbc029f5fe1392b83fe784127c4943e
- package: golang.org/x/crypto
version: e1a4589e7d3ea14a3352255d04b6f1a418845e5e
subpackages:
Expand All @@ -71,3 +69,6 @@ import:
version: v1.0.0
- package: github.com/gorilla/websocket
version: v1.2.0
- package: github.com/hashicorp/yamux
- package: github.com/spf13/cobra
version: v0.0.2
4 changes: 2 additions & 2 deletions server/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import (
"github.com/fatedier/frp/utils/version"
"github.com/fatedier/frp/utils/vhost"

"github.com/xtaci/smux"
fmux "github.com/hashicorp/yamux"
)

const (
Expand Down Expand Up @@ -234,7 +234,7 @@ func (svr *Service) HandleListener(l frpNet.Listener) {
}

if g.GlbServerCfg.TcpMux {
session, err := smux.Server(frpConn, nil)
session, err := fmux.Server(frpConn, nil)
if err != nil {
log.Warn("Failed to create mux connection: %v", err)
frpConn.Close()
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.17.0"
var version string = "0.18.0"

func Full() string {
return version
Expand Down

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

Loading

0 comments on commit c008b14

Please sign in to comment.