Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
G
gost
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nanahira
gost
Commits
5869a515
Commit
5869a515
authored
Aug 13, 2017
by
rui.zheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove SOCKS4 suppport for auto handler
parent
8cbd2722
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
8 deletions
+10
-8
README.md
README.md
+3
-2
README_en.md
README_en.md
+3
-2
cmd/gost/main.go
cmd/gost/main.go
+3
-3
handler.go
handler.go
+1
-1
No files found.
README.md
View file @
5869a515
...
...
@@ -117,11 +117,12 @@ scheme://[bind_address]:port/[host]:hostport
"ChainNodes"
:
[
"http://192.168.1.1:8080"
,
"https://10.0.2.1:443"
]
],
"Debug"
:
true
}
```
ServeNodes等同于-L参数,ChainNodes等同于-F参数
`ServeNodes`
等同于
`-L`
参数,
`ChainNodes`
等同于
`-F`
参数,
`Debug`
等同于
`-D`
参数。
使用方法
...
...
README_en.md
View file @
5869a515
...
...
@@ -117,11 +117,12 @@ The configuration file is in standard JSON format:
"ChainNodes"
:
[
"http://192.168.1.1:8080"
,
"https://10.0.2.1:443"
]
],
"Debug"
:
true
}
```
ServeNodes is equivalent to the -L parameter, ChainNodes is equivalent to the -F
parameter.
`ServeNodes`
is equivalent to the
`-L`
parameter,
`ChainNodes`
is equivalent to the
`-F`
parameter,
`Debug`
is equivalent to the
`-D`
parameter.
Usage
------
...
...
cmd/gost/main.go
View file @
5869a515
...
...
@@ -24,7 +24,7 @@ import (
var
(
options
struct
{
ChainNodes
,
ServeNodes
stringList
Debug
Mode
bool
Debug
bool
}
)
...
...
@@ -37,7 +37,7 @@ func init() {
flag
.
Var
(
&
options
.
ChainNodes
,
"F"
,
"forward address, can make a forward chain"
)
flag
.
Var
(
&
options
.
ServeNodes
,
"L"
,
"listen address, can listen on multiple ports"
)
flag
.
StringVar
(
&
configureFile
,
"C"
,
""
,
"configure file"
)
flag
.
BoolVar
(
&
options
.
Debug
Mode
,
"D"
,
false
,
"enable debug log"
)
flag
.
BoolVar
(
&
options
.
Debug
,
"D"
,
false
,
"enable debug log"
)
flag
.
BoolVar
(
&
printVersion
,
"V"
,
false
,
"print version"
)
flag
.
Parse
()
...
...
@@ -57,7 +57,7 @@ func init() {
}
gost
.
SetLogger
(
&
gost
.
LogLogger
{})
gost
.
Debug
=
options
.
Debug
Mode
gost
.
Debug
=
options
.
Debug
}
func
main
()
{
...
...
handler.go
View file @
5869a515
...
...
@@ -96,7 +96,7 @@ func (h *autoHandler) Handle(conn net.Conn) {
cc
:=
&
bufferdConn
{
Conn
:
conn
,
br
:
br
}
switch
b
[
0
]
{
case
gosocks4
.
Ver4
:
SOCKS4Handler
(
h
.
options
...
)
.
Handle
(
cc
)
return
// SOCKS4(a) does not suppport authentication method, so we ignore it.
case
gosocks5
.
Ver5
:
SOCKS5Handler
(
h
.
options
...
)
.
Handle
(
cc
)
default
:
// http
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment