Giter Site home page Giter Site logo

titanz9012 / proxysampler Goto Github PK

View Code? Open in Web Editor NEW

This project forked from packetstream/proxysampler

0.0 0.0 0.0 23 KB

ProxySampler is a tool for testing proxies and measuring their health & performance.

License: GNU General Public License v3.0

Go 100.00%

proxysampler's Introduction

ProxySampler. CLI tool for testing & measuring the health of proxy tunnels.

Go Report Card

ProxySampler is a tool for testing proxies and measuring their performance & health.

How can I use this?

Use this tool to check the performance and health of proxy tunnels. Test massive lists or one-off proxies.

PacketStream customers can use this tool as part of their automation tooling to get metrics on which residential proxy sessions/geolocations are performing more reliably and prioritize those sessions.

We use this tool internally at PacketStream as part of our infrastructure monitoring toolset to keep an eye on the the health of our proxy tunnel and trigger alerts if something doesn't seem right.

Installation

Go

go get -u github.com/packetstream/proxysampler

Usage and options

You provide the proxy server, port, and auth information. ProxySampler tests the proxy tunnel(s) and returns information about the response codes and response times.

ProxySampler is straightforward to use and has a few cli arguments for configuration.

Usage: 
  proxysampler [OPTIONS]

Application Options:
  --output {json|yaml|plaintext}    Default is plaintext.
  --include-response-body           Include response bodies in JSON/YAML output. Disabled by default.
  --file {/path/to/file.txt}        Relative/absolute path to a file containing a list of proxies.
  --proxy {proxy info}              Test a single proxy tunnel. Example: https://proxyuser:[email protected]:31111
  --endpoint {https://example.com}  The endpoint that you want to use for testing.
  --max-threads {10}                Number of concurrent threads to use for testing proxy. Default is 10.
  --delay {50}                      Delay in ms between each request. Default is 50.

Help Options
  --help, -h                        Show this screen.

Usage examples

Testing a single PacketStream residential proxy with a US exit IP. JSON output.
proxysampler --output json --proxy https://proxyuser:[email protected]:31111 --endpoint https://example.com
{
  "success": 1,
  "fail": 0,
  "average_ttfb": 221,
  "results": [
    {
      "proxy": "https://proxyuser:[email protected]:31111",
      "endpoint": "https://example.com",
      "status_code": 200,
      "latency": {
        "ttfb": 221,
        "connect": 34,
        "tls_handshake": 23
      },
      "error": null
    }
  ]
}
Testing a list of PacketStream residential proxies from a file. JSON output. Include response bodies.
proxysampler --output json --file ./proxies.txt --endpoint https://ifconfig.co/json --include-response-body
{
  "success": 3,
  "fail": 0,
  "average_ttfb": 693,
  "results": [
    {
      "proxy": "https://proxyuser:[email protected]:31111",
      "endpoint": "https://ifconfig.co/json",
      "status_code": 200,
			"response_body": "{\"ip\":\"47.149.139.253\",\"ip_decimal\":798329853,\"country\":\"United States\",\"country_eu\":false,\"country_iso\":\"US\",\"city\":\"Torrance\",\"latitude\":33.846,\"longitude\":-118.3456,\"asn\":\"AS5650\",\"asn_org\":\"Frontier Communications of America, Inc.\"}",
      "latency": {
        "ttfb": 552,
        "connect": 29,
        "tls_handshake": 141
      },
      "error": null
    },
    {
      "proxy": "https://proxyuser:[email protected]:31111",
      "endpoint": "https://ifconfig.co/json",
      "status_code": 200,
      "response_body": "{\"ip\":\"63.237.69.254\",\"ip_decimal\":1072514558,\"country\":\"United States\",\"country_eu\":false,\"country_iso\":\"US\",\"city\":\"Walkersville\",\"hostname\":\"ssl.clarkconstruction.com\",\"latitude\":39.4787,\"longitude\":-77.3484,\"asn\":\"AS16431\",\"asn_org\":\"The Clark Construction Group, Inc.\"}",
      "latency": {
        "ttfb": 534,
        "connect": 28,
        "tls_handshake": 114
      },
      "error": null
    },
    {
      "proxy": "https://proxyuser:[email protected]:31111",
      "endpoint": "https://ifconfig.co/json",
      "status_code": 200,
      "response_body": "{\"ip\":\"24.167.234.46\",\"ip_decimal\":413657646,\"country\":\"United States\",\"country_eu\":false,\"country_iso\":\"US\",\"city\":\"Milwaukee\",\"hostname\":\"cpe-24-167-234-46.wi.res.rr.com\",\"latitude\":43.1166,\"longitude\":-87.9904,\"asn\":\"AS10796\",\"asn_org\":\"Charter Communications Inc\"}",
      "latency": {
        "ttfb": 993,
        "connect": 27,
        "tls_handshake": 272
      },
      "error": null
    }
  ]
}

Contributing

We'd love to accept your improvements! Feel free to fork & submit a pull-request if you'd like to make changes.

Additional information

This tool was built by the PacketStream team at https://packetstream.io.

PacketStream is a residential proxy network powered by peer-to-peer technology that allows business customers to tunnel web traffic through real residential ISP users who opt-in to share their bandwidth with the network.

Get more information about PacketStream on our website: https://packetstream.io

proxysampler's People

Contributors

rdbell avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.