MCPcopy Index your code
hub / github.com/bepass-org/proxy

github.com/bepass-org/proxy @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
147 symbols 308 edges 15 files 28 documented · 19%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Table of Contents

Introduction

The proxy module simplifies connection handling and offers a generic way to work with both HTTP and SOCKS connections, making it a powerful tool for managing network traffic.

Features

The Inbound Proxy project offers the following features:

  • Full support for HTTP, SOCKS5, SOCKS5h, SOCKS4 and SOCKS4a protocols.
  • Handling of HTTP and HTTPS-connect proxy requests.
  • Full support for both IPv4 and IPv6.
  • Able to handle both TCP and UDP traffic.

Installation

go get github.com/bepass-org/proxy

Examples

Minimal

package main

import (
    "github.com/bepass-org/proxy/pkg/mixed"
)

func main() {
    proxy := mixed.NewProxy()
    _ = proxy.ListenAndServe()
}

Customized

package main

import (
  "github.com/bepass-org/proxy/pkg/mixed"
)

func main() {
  proxy := mixed.NewProxy(
    mixed.WithBindAddress("0.0.0.0:8080"),
  )
  _ = proxy.ListenAndServe()
}

There are other examples provided in the example directory

Extension points exported contracts — how you extend this code

Logger (Interface)
(no doc) [2 implementers]
pkg/statute/statute.go
ServerOption (FuncType)
(no doc)
pkg/http/server.go
ServerOption (FuncType)
(no doc)
pkg/socks4/server.go
Option (FuncType)
(no doc)
pkg/mixed/proxy.go
ServerOption (FuncType)
(no doc)
pkg/socks5/server.go
UserConnectHandler (FuncType)
UserConnectHandler is used for socks5, socks4 and http
pkg/statute/statute.go
UserAssociateHandler (FuncType)
UserAssociateHandler is used for socks5
pkg/statute/statute.go
ProxyDialFunc (FuncType)
ProxyDialFunc is used for socks5, socks4 and http
pkg/statute/statute.go

Core symbols most depended-on inside this repo

Error
called by 20
pkg/statute/statute.go
Write
called by 19
pkg/socks5/common.go
String
called by 17
pkg/socks5/common.go
Close
called by 16
pkg/socks5/common.go
Write
called by 9
pkg/http/common.go
sendReply
called by 7
pkg/socks5/server.go
Read
called by 7
pkg/socks5/common.go
Debug
called by 6
pkg/statute/statute.go

Shape

Function 65
Method 47
Struct 17
FuncType 10
TypeAlias 6
Interface 2

Languages

Go100%

Modules by API surface

pkg/socks5/common.go24 symbols
pkg/socks5/server.go22 symbols
pkg/statute/statute.go18 symbols
pkg/socks4/server.go16 symbols
pkg/socks4/common.go13 symbols
pkg/http/server.go13 symbols
pkg/mixed/handlers.go10 symbols
pkg/mixed/proxy.go9 symbols
pkg/http/common.go8 symbols
pkg/statute/tunnel.go5 symbols
example/customLogger/logger.go4 symbols
example/customHandler/main.go2 symbols

For agents

$ claude mcp add proxy \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact