prox5/README.md

79 lines
3.7 KiB
Markdown
Raw Normal View History

2021-11-25 03:07:46 +00:00
# Prox5
2021-10-27 02:51:14 +00:00
2022-05-23 01:21:36 +00:00
[![GoDoc](https://godoc.org/git.tcp.direct/kayos/prox5?status.svg)](https://pkg.go.dev/git.tcp.direct/kayos/prox5) [![Go Report Card](https://goreportcard.com/badge/github.com/yunginnanet/prox5)](https://goreportcard.com/report/github.com/yunginnanet/prox5) [![IRC](https://img.shields.io/badge/ircd.chat-%23tcpdirect-blue.svg)](ircs://ircd.chat:6697/#tcpdirect)
2021-10-27 02:51:14 +00:00
2022-10-16 13:14:52 +00:00
![Animated Screenshot](https://tcp.ac/i/3WRfz.gif)
2022-10-16 13:17:47 +00:00
### SOCKS5/4/4a validating proxy pool + SOCKS5 server
2021-09-13 11:31:16 +00:00
2021-11-25 03:07:46 +00:00
Prox5 is a golang library for managing, validating, and accessing thousands upon thousands of arbitrary SOCKS proxies.
2021-10-09 20:45:30 +00:00
2021-11-25 03:07:46 +00:00
Notably it features interface compatible dialer functions that dial out from different proxies for every connection, and a SOCKS5 server that utilizes those functions.
---
2022-10-23 05:04:41 +00:00
### 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.
2022-10-23 05:06:54 +00:00
---
2022-10-23 05:04:41 +00:00
2022-10-16 13:16:57 +00:00
### Validation Engine
2022-06-12 15:25:43 +00:00
2022-10-16 13:51:48 +00:00
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
2021-11-25 03:07:46 +00:00
2022-10-16 13:51:48 +00:00
##### 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()`.
2022-06-12 15:25:43 +00:00
2022-10-16 13:53:24 +00:00
---
2022-10-04 05:58:50 +00:00
### Rate Limiting
Using [Rate5](https://github.com/yunginnanet/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.
2022-10-16 13:53:24 +00:00
---
### 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
---
2022-06-12 15:25:43 +00:00
### 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
2022-10-16 13:53:24 +00:00
---
2021-11-25 03:07:46 +00:00
2021-11-28 07:42:19 +00:00
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.
2022-10-16 13:53:24 +00:00
2022-09-05 06:25:35 +00:00
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.](https://pkg.go.dev/git.tcp.direct/kayos/prox5)
2021-11-25 03:07:46 +00:00
2022-10-16 13:53:24 +00:00
---
### Status
2021-11-25 03:07:46 +00:00
**This project is in development.**
It "works" and has been used in "production", but still needs some love.
2021-09-13 15:09:47 +00:00
2021-10-27 03:13:43 +00:00
Please break it and let me know what broke.
2021-09-13 15:06:17 +00:00
2022-09-23 02:40:50 +00:00
### **See [the docs](https://pkg.go.dev/git.tcp.direct/kayos/prox5) and the [example](example/main.go) for more details.**