Go to file
dependabot[bot] 88df879d27
Bump github.com/refraction-networking/utls from 1.1.2 to 1.1.5
Bumps [github.com/refraction-networking/utls](https://github.com/refraction-networking/utls) from 1.1.2 to 1.1.5.
- [Release notes](https://github.com/refraction-networking/utls/releases)
- [Commits](https://github.com/refraction-networking/utls/compare/v1.1.2...v1.1.5)

---
updated-dependencies:
- dependency-name: github.com/refraction-networking/utls
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-25 08:47:05 +00:00
.github Update go.yml 2022-08-28 22:49:51 -07:00
example Fix: SOCKS5 upstream server 2022-10-19 06:15:16 -07:00
internal Feat: Implement AutoScale 2022-10-16 05:56:40 -07:00
logger SOCKS5 upstream server refactor 2022-10-19 05:36:31 -07:00
.gitignore Chore: tidy up 2022-07-25 00:14:26 -07:00
conductor.go Chore: rename 2022-10-16 03:53:04 -07:00
daemons.go Feat: Implement AutoScale 2022-10-16 05:56:40 -07:00
debug.go SOCKS5 upstream server refactor 2022-10-19 05:36:31 -07:00
defs.go SOCKS5 upstream server refactor 2022-10-19 05:36:31 -07:00
dispense.go Chore: rename 2022-10-16 03:53:04 -07:00
getters.go Feat: Implement AutoScale 2022-10-16 05:56:40 -07:00
go.mod Bump github.com/refraction-networking/utls from 1.1.2 to 1.1.5 2022-10-25 08:47:05 +00:00
go.sum Bump github.com/refraction-networking/utls from 1.1.2 to 1.1.5 2022-10-25 08:47:05 +00:00
LICENSE Add: SetStaleTime, GetStaleTime, GetMaxWorkers 2021-09-13 09:32:07 -07:00
list_management.go Chore: rename 2022-10-16 03:53:04 -07:00
mr_worldwide.go Chore: rename 2022-10-16 03:53:04 -07:00
mystery_dialer.go SOCKS5 upstream server refactor 2022-10-19 05:36:31 -07:00
mystery_resolver.go Chore: rename 2022-10-16 03:53:04 -07:00
parse_test.go Improve parsing 2022-10-11 17:15:57 -07:00
parse.go Use pool implementation from common package 2022-10-16 00:28:26 -07:00
proto.go Use pool implementation from common package 2022-10-16 00:33:23 -07:00
proxy.go Chore: rename 2022-10-16 03:53:04 -07:00
README.md Markdown: fmt 2022-10-22 22:06:54 -07:00
setters.go Feat: Implement AutoScale 2022-10-16 05:56:40 -07:00
socks5_server.go Fix: SOCKS5 upstream server 2022-10-19 06:15:16 -07:00
stats.go Chore: rename 2022-10-16 03:53:04 -07:00
validator_engine.go Chore: rename 2022-10-16 03:53:04 -07:00

Prox5

GoDoc Go Report Card IRC

Animated Screenshot

SOCKS5/4/4a validating proxy pool + SOCKS5 server

Prox5 is a golang library for managing, validating, and accessing thousands upon thousands of arbitrary SOCKS proxies.

Notably it features interface compatible dialer functions that dial out from different proxies for every connection, and a SOCKS5 server that utilizes those functions.


WARNING

You very well may end up causing denial of service when using this library with certain tools.

It is fairly easy to end up with a slowloris type effect with this library when paired with efficient tools that try to reuse http connections or that tend to use keepalive. Because the tool has no idea what the proxy server is doing (dialing with different connections often) you may end up leaving a ton of open connections from a website to the proxy servers. This is either a bug or a feature... That much is for you to decide.


Validation Engine

  1. TCP Dial to the endpoint
  2. HTTPS GET request to a list of IP echo endpoints
  3. Store the IP address discovered during step 2
  4. Instantiate a pointer to a prox5.Proxy type
  5. Enqueue the pointer for future use
Auto Scaling

The validation has an optional auto scale feature that allows for the automatic tuning of validation workers as more proxies are dispensed. This feature is brand new and is missing configuration, but works well. It can be enabled with ProxyEngine.EnableAutoScaler().


Rate Limiting

Using Rate5, prox5 naturally reduces the frequency of proxies that fail to validate. It does this by reducing the frequency proxies are accepted into the validation pipeline the more they fail to verify. This is not yet adjustable, but will be soon. See the documentation for Rate5, and the source for prox5 (defs.go is a good place to start) for more details.


Accessing Validated Proxies

  • Retrieve validated 4/4a/5 proxies as simple strings for generic use
  • Use one of the dialer functions with any golang code that calls for a net.Dialer
  • Spin up a SOCKS5 server that will then make rotating use of your validated proxies

The Secret Sauce

What makes Prox5 special is largely the Mystery Dialer. This dialer satisfies the net.Dialer interface. Upon using the dialer to connect to and endpoint, Prox5:

  • Loads up a previously verified proxy
  • Attempts to make connection with the dial endpoint using said proxy
  • Upon failure, prox5:
    • repeats this process mid-dial
    • does not drop connection to the client
  • Once a proxy has been successfully used to connect to the target endpoint, prox5 passes the same net.Conn onto the client

The way you choose to use this lib is yours. The API is fairly extensive for you to be able to customize runtime configuration without having to do any surgery.

Things like the amount of validation workers that are concurrently operating, timeouts, and proxy re-use policies may be tuned in real-time. please read the docs.


Status

This project is in development.

It "works" and has been used in "production", but still needs some love.

Please break it and let me know what broke.

See the docs and the example for more details.