nfx / slrp

rotating open proxy multiplexer
MIT License
170 stars 26 forks source link
crawler golang proxy proxy-checker proxy-list proxy-pool proxy-server

SLRP - rotating open proxy multiplexer

slrp logo

codecov lines downloads

Usage

Download service, start it up, wait couple of minutes for the pool to pick up. Now run curl --proxy-insecure -D - -x http://127.0.0.1:8090 -k http://httpbin.org/get couple of times and see different origins and user agent headers.

Concepts

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

User Interface

Overview

overview

http://localhost:8089/ shows current source refresh status and stats.

Proxies

proxies

http://localhost:8089/proxies provides search interface over active pool of found proxies. By default, entries are sorted by last working on top. Query samples:

History

history

http://localhost:8089/history provides search interface over the last 1000 forwarding attempts (configurable). Sample queries:

Reverify

http://localhost:8089/reverify provides search interface over timed out probes. Sample queries:

Blacklist

http://localhost:8089/blacklist provides search interface over unsuccessful probes. Sample queries:

Configuration

Conf file is looked in the following paths:

  1. $PWD/slrp.yml
  2. $PWD/config.yml
  3. $HOME/.slrp/config.yml

Default configuration is approximately the following:

app:
  state: $HOME/.slrp/data
  sync: 1m
log:
  level: info
  format: pretty
server:
  addr: "localhost:8089"
  read_timeout: 15s
mitm:
  addr: "localhost:8090"
  read_timeout: 15s
  idle_timeout: 15s
  write_timeout: 15s
pprof:
  enable: false
  addr: "localhost:6060"
checker:
  timeout: 5s
  strategy: simple
history:
  limit: 1000

Every configuration property can be overridden through environment variable by using SLRP_ prefix followed by section name and key, divided by _. For example, in order to set log level to trace, do SLRP_LOG_LEVEL=TRACE slrp.

app

Fabric that holds application components together.

dialer

WireGuard userspace VPN dialer configuration. Embeds the official Go implementation. Disabled by default.

Sample WireGuard configuration file:

[Interface]
PrivateKey = gI6EdUSYvn8ugXOt8QQD6Yc+JyiZxIhp3GInSWRfWGE=
Address = 1.2.3.4/24
DNS =  1.2.3.4

[Peer]
PublicKey = HIgo9xNzJMWLKASShiTqIybxZ0U3wGLiUeJ1PKf8ykw=
Endpoint = 1.2.3.4:51820
AllowedIPs = 0.0.0.0/0

log

Structured logging meta-components.

server

API and UI serving component.

pool

Proxy pool maintenance.

probe

Proxy probing component.

refresher

Source refresh component.

mitm

HTTP proxy frontend.

checker

Component for verification of proxy liveliness and anonymity.

history

Component for recording forwarded requests through a pool of proxies.

ipinfo

You can optionally enable this feature. This product includes GeoLite2 Data created by MaxMind, available from https://www.maxmind.com.

API

GET /api

Retrieve last sync status for all components

GET /api/dashboard

Get information about refresh status for all sources

GET /api/pool

Get 20 last used proxies

POST /api/refresher/{source_name}

Start refreshing the source

DELETE /api/refresher/{source_name}

Stop refreshing the source

GET /api/history

Get 100 last forwarding attempts

GET /api/history/{id}

Get sanitized HTTP response from forwarding attempt

GET /api/reverify

Get first 20 timed out items that are in the reverify pool

GET /api/blacklist

Get first 20 blacklisted items sorted by proxy along with common error stats

Developing

UI development requires npm installed. Once you have it, please npm install vite typescript -g.

References

Star History

Star History Chart