Skip to content

Commit 0e9c184

Browse files
fixed API, bumped to v1.10.3
1 parent 901fabe commit 0e9c184

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ You can download the binary for your platform from [Releases](https://github.com
107107
Example:
108108

109109
```shell
110-
GOHPTS_RELEASE=v1.10.2; wget -v https://github.com/shadowy-pycoder/go-http-proxy-to-socks/releases/download/$GOHPTS_RELEASE/gohpts-$GOHPTS_RELEASE-linux-amd64.tar.gz -O gohpts && tar xvzf gohpts && mv -f gohpts-$GOHPTS_RELEASE-linux-amd64 gohpts && ./gohpts -h
110+
GOHPTS_RELEASE=v1.10.3; wget -v https://github.com/shadowy-pycoder/go-http-proxy-to-socks/releases/download/$GOHPTS_RELEASE/gohpts-$GOHPTS_RELEASE-linux-amd64.tar.gz -O gohpts && tar xvzf gohpts && mv -f gohpts-$GOHPTS_RELEASE-linux-amd64 gohpts && ./gohpts -h
111111
```
112112

113113
Alternatively, you can install it using `go install` command (requires Go [1.24](https://go.dev/doc/install) or later):

gohpts.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ func New(conf *Config) *proxyapp {
417417
if err != nil {
418418
p.logger.Fatal().Err(err).Msg("")
419419
}
420-
auth := Auth{
420+
auth := auth{
421421
User: conf.User,
422422
Password: conf.Pass,
423423
}
@@ -952,7 +952,7 @@ func (p *proxyapp) updateSocksList() {
952952
chainType := p.proxychain.Type
953953
ctl := colorizeChainType(chainType, p.nocolor)
954954
for _, pr := range p.proxylist {
955-
auth := Auth{
955+
auth := auth{
956956
User: pr.Username,
957957
Password: pr.Password,
958958
}
@@ -986,7 +986,7 @@ func (p *proxyapp) updateSocksList() {
986986
}
987987
currentDialer := dialer
988988
for _, pr := range p.proxylist[failed+1:] {
989-
auth := Auth{
989+
auth := auth{
990990
User: pr.Username,
991991
Password: pr.Password,
992992
}
@@ -1083,7 +1083,7 @@ func (p *proxyapp) getSocks() (*socks5.Dialer, *http.Client, error) {
10831083
var dialer *socks5.Dialer
10841084
var err error
10851085
for i, pr := range copyProxyList {
1086-
auth := Auth{
1086+
auth := auth{
10871087
User: pr.Username,
10881088
Password: pr.Password,
10891089
}

helpers.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -150,20 +150,20 @@ func splitHostPort(address string) (string, int, error) {
150150
return host, portnum, nil
151151
}
152152

153-
type Auth struct {
153+
type auth struct {
154154
User, Password string
155155
}
156156

157-
type ContextDialer interface {
157+
type contextDialer interface {
158158
DialContext(ctx context.Context, network, address string) (net.Conn, error)
159159
}
160160

161161
var (
162-
_ ContextDialer = &socks5.Dialer{}
163-
_ ContextDialer = &net.Dialer{}
162+
_ contextDialer = &socks5.Dialer{}
163+
_ contextDialer = &net.Dialer{}
164164
)
165165

166-
func newSOCKS5Dialer(address string, auth *Auth, forward ContextDialer) (*socks5.Dialer, error) {
166+
func newSOCKS5Dialer(address string, auth *auth, forward contextDialer) (*socks5.Dialer, error) {
167167
d := &socks5.Dialer{
168168
ProxyNetwork: "tcp",
169169
IsResolve: false,

version.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
package gohpts
22

3-
const Version string = "gohpts v1.10.2"
3+
const Version string = "gohpts v1.10.3"

0 commit comments

Comments
 (0)