Categorygithub.com/missdeer/ProxyClient
modulepackage
0.0.0-20250305230402-d915bc046ffc
Repository: https://github.com/missdeer/proxyclient.git
Documentation: pkg.go.dev

# README

ProxyClient

the proxy client library

supported SOCKS4, SOCKS4A, SOCKS5, HTTP, HTTPS etc proxy protocols

Supported Schemes

  • Direct
  • Reject
  • Blackhole
  • HTTP
  • HTTPS
  • SOCKS4
  • SOCKS4A
  • SOCKS5
  • SOCKS5 with TLS
  • ShadowSocks
  • SSH Agent
  • VMess

Documentation

The full documentation is available on Godoc.

Example

package main

import (
	"fmt"
	"io/ioutil"
	"net/http"
	"net/url"
	"github.com/RouterScript/ProxyClient"
)

func main() {
	proxy, _ := url.Parse("http://localhost:8080")
	dial, _ := proxyclient.NewClient(proxy)
	client := &http.Client{
		Transport: &http.Transport{
			DialContext: dial.Context,
		},
	}
	request, err := client.Get("http://www.example.com")
	if err != nil {
		panic(err)
	}
	content, err := ioutil.ReadAll(request.Body)
	if err != nil {
		panic(err)
	}
	fmt.Println(string(content))
}

Reference

see http://github.com/GameXG/ProxyClient

# Packages

No description provided by the author

# Functions

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Type aliases

No description provided by the author
No description provided by the author