Skip to content

Commit

Permalink
0909
Browse files Browse the repository at this point in the history
  • Loading branch information
txthinking committed Sep 5, 2017
1 parent faff6bd commit 23a3475
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 8 deletions.
2 changes: 1 addition & 1 deletion cli/brook/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ var debugAddress string
func main() {
app := cli.NewApp()
app.Name = "Brook"
app.Version = "20170826"
app.Version = "20170909"
app.Usage = "A Cross-Platform Proxy Software"
app.Author = "Cloud"
app.Email = "cloud@txthinking.com"
Expand Down
2 changes: 1 addition & 1 deletion gui/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ func run() {
systray.AddMenuItem("---------", "").Disable()
mGithub := systray.AddMenuItem("Upgrade", "")
mEmail := systray.AddMenuItem("Contact: cloud@txthinking.com", "")
systray.AddMenuItem("Version: 20170826", "")
systray.AddMenuItem("Version: 20170909", "")
systray.AddMenuItem("---------", "").Disable()
mQuit := systray.AddMenuItem("Quit", "")

Expand Down
5 changes: 1 addition & 4 deletions run.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,7 @@ func RunRelay(address, server string, timeout, deadline int) error {

// RunSocks5Server used to make a new Socks5Server and start a raw socks5 proxy to listen
func RunSocks5Server(address, username, password string, timeout, deadline int) error {
s, err := NewSocks5Server(address, username, password, timeout, deadline, nil)
if err != nil {
return err
}
s := NewSocks5Server(address, username, password, timeout, deadline, nil)
return s.ListenAndServe(nil)
}

Expand Down
4 changes: 2 additions & 2 deletions socks5.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ type Socks5Server struct {
}

// NewSocks5Server returns a new Socks5Server, dial can be set to nil
func NewSocks5Server(address, userName, password string, timeout, deadline int, dial Dialer) (*Socks5Server, error) {
func NewSocks5Server(address, userName, password string, timeout, deadline int, dial Dialer) *Socks5Server {
if dial == nil {
dial = &DefaultDial{}
}
Expand All @@ -35,7 +35,7 @@ func NewSocks5Server(address, userName, password string, timeout, deadline int,
Deadline: deadline,
Dial: dial,
}
return c, nil
return c
}

// ListenAndServe will let client start to listen and serve, sm can be nil
Expand Down

0 comments on commit 23a3475

Please sign in to comment.