Merge master changes into dev

This commit is contained in:
kayos@tcp.direct 2021-11-25 01:01:57 -08:00
commit 1b4cc430c9
Signed by: kayos
GPG Key ID: 4B841471B4BEE979
3 changed files with 50 additions and 8 deletions

11
.github/dependabot.yml vendored Normal file
View File

@ -0,0 +1,11 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
version: 2
updates:
- package-ecosystem: "gomod" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "daily"

View File

@ -1,16 +1,43 @@
## Prox5
# Prox5
[![GoDoc](https://godoc.org/git.tcp.direct/kayos/Prox5?status.svg)](https://godoc.org/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)
[![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)
### SOCKS5/4/4a validating proxy pool
### SOCKS5/4/4a validating proxy pool + server
![Demo](./Prox5.gif)
Prox5 is a golang library for managing, validating, and accessing thousands upon thousands of arbitrary SOCKS proxies.
This package is 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.
Notably it features a SOCKS5 server function that dials out from a different validated proxy for every connection.
---
### Initial validation sequence
- TCP Dial to the endpoint
- HTTPS GET request to a list of IP echo endpoints
Prox5 will then store the endpoint's outward appearing IP address and mark it as valid for use.
### 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 the Dial or ContextDial interfaces
- Spin up a SOCKS5 server that will then make rotating use of your validated proxies.
The way you choose to use this lib is yours. The API is fairly extensive for you to be able to customize the runtime options without having to do any surgery.
Things like the amount of validation workers that are concurrently operating, various timeouts, and proxy re-use policies. may be tuned in real-time. [please the docs.](https://pkg.go.dev/git.tcp.direct/kayos/Prox5)
---
**This project is in development.**
It "works" and has been used in "production", but still needs some love.
This project is in development. It works and has been used in "production", but mainly this readme and the documentation needs some love.
Please break it and let me know what broke.
**See [the docs](https://godoc.org/git.tcp.direct/kayos/Prox5) and the [example](example/main.go) for more details.**
### **See [the docs](https://pkg.go.dev/git.tcp.direct/kayos/Prox5) and the [example](example/main.go) for more details.**

View File

@ -104,6 +104,9 @@ func (s *Swamp) recycling() int {
}
var count int
s.swampmap.mu.RLock()
defer s.swampmap.mu.RUnlock()
for _, sock := range s.swampmap.plot {
select {
case s.Pending <- sock:
@ -114,6 +117,7 @@ func (s *Swamp) recycling() int {
}
}
return count
}