GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - cnlangzi/proxyclient: Enhanced HTTP Client with Multi-Proxy Support(http/socks/ssh/vmess/vless/ss/ssr/trojan/hysteria) for Go

BranchesTags
Open more actions menu

Latest commit

 

History

120 Commits
120 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
.vscode
.vscode
 
 
hy2
hy2
 
 
ss
ss
 
 
xray
xray
 
 
.gitignore
.gitignore
 
 
.golangci.yml
.golangci.yml
 
 
LICENSE
LICENSE
 
 
Makefile
Makefile
 
 
README.md
README.md
 
 
bool.go
bool.go
 
 
client.go
client.go
 
 
go.mod
go.mod
 
 
go.sum
go.sum
 
 
int.go
int.go
 
 
option.go
option.go
 
 
ping.go
ping.go
 
 
ping_test.go
ping_test.go
 
 
proxy.go
proxy.go
 
 
proxy_http.go
proxy_http.go
 
 
proxy_http_test.go
proxy_http_test.go
 
 
proxy_socks.go
proxy_socks.go
 
 
proxy_socks_test.go
proxy_socks_test.go
 
 
proxy_test.go
proxy_test.go
 
 
string.go
string.go
 
 
url.go
url.go
 
 
url_test.go
url_test.go
 
 

Repository files navigation

ProxyClient

Enhanced HTTP Client with Multi-Proxy Support for Go

ProxyClient is a Go package that extends the standard http.Client to seamlessly support multiple proxy protocols, including HTTP/HTTPS, SOCKS4, SOCKS5, SSL, V2Ray, SSR/SS, and MTProto. It provides a unified interface for developers to interact with diverse proxy types without manual low-level configurations.

Tests Codecov Go Report Card Go Reference GitHub Release License PRs welcome

Features

• Multi-Protocol Support:
• HTTP/HTTPS Proxy: Direct and authenticated connections.
• SOCKS4/SOCKS5: Full support for SOCKS protocols (IPv4/IPv6).
• SSL/TLS Tunneling: Secure proxy tunneling for encrypted traffic.
• V2Ray/SSR/SS: Integration with popular proxy tools (Shadowsocks, V2Ray core).
• MTProto: Native support for Telegram’s MTProto protocol.

• Simplified API: Create a proxy-enabled client with a single function call.
• Authentication: Built-in handling for username/password, encryption keys, and token-based auth.
• Compatibility: Fully compatible with Go’s standard http.Client methods (Get, Post, etc.).

Quick Start

Installation

go get github.com/cnlangzi/proxyclient

Usage Example

package main

import (
    "fmt"
    "github.com/cnlangzi/proxyclient"
    // import v5 vmess/vless/trojan/ssr (via xray)
    _ "github.com/cnlangzi/proxyclient/xray"
    // import ss
    _ "github.com/cnlangzi/proxyclient/ss"
)

func main() {
    // Create a client with SOCKS5 proxy
    client, err := proxyclient.New("socks5://user:[email protected]:1080")
    
    if err != nil {
        panic(err)
    }

    // Use like a standard http.Client
    resp, err := client.Get("https://example.com")
    if err != nil {
        panic(err)
    }
    defer resp.Body.Close()

    fmt.Println("Response status:", resp.Status)
}

Supported Proxy Types

Protocol Example Config
http http://user:[email protected]:8080
https https://user:[email protected]:8080
socks4 socks4://user:[email protected]:1080
socks5 socks5://user:[email protected]:1080
trojan trojan://pass@host:40021?allowInsecure=0&sni=&type=ws
vmess(v5) vmess://eyJ2IjogIjIiLCAicHMiOiAiXHU1Yz...
vless(v5) vless://uuid@host:port?allowInsecure=false&security=tls...
ss ss://user:[email protected]:8080
ssr ssr://user:[email protected]:8080
ssh ssh://user:[email protected]:2222
MTProto mtproto://user:[email protected]:8080

Why Use proxyclient?

• Unified Interface: Simplify code for multi-proxy environments.
• Extensible: Easily add new proxy protocols via modular design.


Contributions welcome! 🚀

About

Enhanced HTTP Client with Multi-Proxy Support(http/socks/ssh/vmess/vless/ss/ssr/trojan/hysteria) for Go

Topics

httphysteriahysteria2mtprotosockssocks4socks4asocks5socks5hsshssrtrojanv2rayvlessvmess

Resources

Readme
MIT license
Activity

Stars

17 stars

Watchers

1 watching

Forks

2 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.