socks4

package
v0.0.0-...-c6b72c6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 27, 2020 License: GPL-3.0, MIT Imports: 7 Imported by: 0

README

go-socks4

Socks4 implementation for Go, compatible with net/proxy

Usage

import (
	"golang.org/x/net/proxy"
	_ "github.com/Bogdan-D/go-socks4"
)

func main() {
	dialer, err := proxy.FromURL("socks4://ip:port",proxy.Direct)
	// check error
	// and use your dialer as you with
}

Tests

If you know proxy server to connect to tests should be running like this go test -socks4.address=localhost:8080

Documentation

Index

Constants

View Source
const (
	ErrWrongURL      = "wrong server url"
	ErrWrongConnType = "no support for connections of type"
	ErrConnFailed    = "connection failed to socks4 server"
	ErrHostUnknown   = "unable to find IP address of host"
	ErrSocksServer   = "socks4 server error"
	ErrConnRejected  = "connection rejected"
	ErrIdentRequired = "socks4 server require valid identd"
)

Variables

This section is empty.

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL