This commit is contained in:
arraykeys@gmail.com
2018-05-15 10:58:17 +08:00
3 changed files with 11 additions and 2 deletions

9
Dockerfile Normal file
View File

@ -0,0 +1,9 @@
FROM golang:1.8.5-alpine as builder
ARG GOPROXY_VERSION=master
RUN apk update && apk upgrade && \
apk add --no-cache git && cd /go/src/ && git clone https://github.com/snail007/goproxy && \
cd goproxy && git checkout ${GOPROXY_VERSION} && \
go get && CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o proxy
FROM alpine:3.7
COPY --from=builder /go/src/goproxy/proxy /
CMD /proxy ${OPTS}

View File

@ -746,7 +746,7 @@ You can also be placed in a file, which is a line, a username: password, a
`./proxy socks -t tcp -p ":33080" -F auth-file.txt` `./proxy socks -t tcp -p ":33080" -F auth-file.txt`
In addition, socks5 proxy also integrates external HTTP API authentication, we can specify a http url interface address through the --auth-url parameter, In addition, socks5 proxy also integrates external HTTP API authentication, we can specify a http url interface address through the --auth-url parameter,
Then when the user is connected, the proxy request this url by get way, with the following four parameters, if the return HTTP status code 204, on behalf of the authentication is successful. Then when the user is connected, the proxy request this url by get way, with the following three parameters, if the return HTTP status code 204, on behalf of the authentication is successful.
In other cases, the authentication fails. In other cases, the authentication fails.
for example: for example:
`./proxy socks -t tcp -p ":33080" --auth-url "http://test.com/auth.php"` `./proxy socks -t tcp -p ":33080" --auth-url "http://test.com/auth.php"`

View File

@ -751,7 +751,7 @@ server连接到bridge的时候,如果同时有多个client连接到同一个brid
`./proxy socks -t tcp -p ":33080" -F auth-file.txt` `./proxy socks -t tcp -p ":33080" -F auth-file.txt`
另外,socks5代理还集成了外部HTTP API认证,我们可以通过--auth-url参数指定一个http url接口地址, 另外,socks5代理还集成了外部HTTP API认证,我们可以通过--auth-url参数指定一个http url接口地址,
然后有用户连接的时候,proxy会GET方式请求这url,带上下面个参数,如果返回HTTP状态码204,代表认证成功 然后有用户连接的时候,proxy会GET方式请求这url,带上下面个参数,如果返回HTTP状态码204,代表认证成功
其它情况认为认证失败. 其它情况认为认证失败.
比如: 比如:
`./proxy socks -t tcp -p ":33080" --auth-url "http://test.com/auth.php"` `./proxy socks -t tcp -p ":33080" --auth-url "http://test.com/auth.php"`