Profiles HTTP/SOCKS proxy(s) as multithreaded in seconds.

Overview

NextGen Proxy Profiler

The scanner (proxyprof) scans and analyzes http/https/socks4/socks5 proxies quickly. It can complete thousands of proxy scans in seconds by running the Curl tool multi-threaded in the background.

Some interesting features:

  • Detects security level of the proxy. Elite, Anon or Transparent.
  • Checks if the proxy has permission from any firewall.
  • Receives input from STDIN and transmits to STDOUT which allows chaining with other tools.

Some features to add in future

  • Checking tunneling support.
  • Private (password protected) proxy support un:pw.
  • Comprohensive black-list/ban-list checking.

Requirements

PHP, Curl, PHP-Curl extension, PHP-Curl class, PHP-CLI-Progress-Bar

Note: proxyprof use modified version of PHP-Curl class so do not update the library.

Installation

$ git clone https://github.com/enseitankado/proxy-profiler.git
$ cd proxy-profiler
$ php proxyprof.php -h

 Author ozgurkoca: github.com/enseitankado/

 -h                     Show this help.
 -p <host:ip>           Check proxy(s). Comma supported.
 -t <type>              Proxy types: http/https, socks4, socks5
 -f <file_name/STDIN>   Input proxy file. Each line has an IP:port. STDIN supported.
 -o <file_name/STDOUT>  Output proxy file or STDOUT ('STDOUT' is casesensitive).
 -l <level>             Min proxy level output filter. Defeault: 3
 -n <num>               Thread count. Default: 250
 -c <secs>              Connection timeout. Default: 5 secs.
 -a <URL>               Blocking test URL. Ex. cloudflare.com protected web service.
 -j <URL>               Judge URL. Default: random azenv.php
 -s                     Silent. No output.
 -g                     List only good proxies.
 -r                     Show progress bar.

 Current Installation:

   PHP 7.4.20
   CURL 7.70.0
   OpenSSL 1.1.1k  25 Mar 2021

 About proxy levels:

   1: Elite proxy servers hide both your IP address and the fact that you are using a proxy server at all.
   2: An anonymous proxy does not reveal your IP address but does reveal that you are using a proxy server.
   3: Transparent proxies do not hide your IP Address and they don’t alter any user information.

proxyprof is PHP-Cli tool and requires some librarys. When you run the tool for the first time, it tests whether the required plug-ins are installed. If it is not installed, it stops working and lists the tools that need to be installed. For example:

$ php proxyprof.php

Multibyte string (mb_) library not installed !
To install and enable the library run commands below:

	sudo apt install php7.4-mbstring
	sudo phpenmod -v 7.4 mbstring


PHP curl library not installed !
To install and enable the library run commands below:

	sudo apt install php7.4-curl
	sudo phpenmod -v 7.4 curl

Command Line Arguments

-h Show this help.

-p <host:ip> It is used to specify comma-separated IP:PORT pairs of proxy servers. Check example below.

-t <type> Specifiy proxy types: http/https, socks4 or socks5.

-f <file_name> Input proxy file. Each line has an IP:PORT format.

Hint: If input proxy file and output name is same and output file not empty then output list merged into input proxy file and will be scanned alltogether again.

-o <file_name/STDOUT> Output proxy file or STDOUT ('STDOUT' is casesensitive). Specifies the name of the file to save the scan results. Proxy servers that meet the scanning criteria are saved in this file. Proxy servers are registered in the same format (IP:PORT) as recorded in the input file (-f).

Hint: If STDOUT is written as the filename, the scan result is simply redirected to standard output. That is, it is printed on the screen. This is a plain output with one IP:PORT per line. This feature is useful for performing chained command executions where the output of proxyprof is routed as input to another tool.

-l <level> Min proxy level output filter. The default value is 3. After establishing a TCP connection to the proxy, the security level is tried to be determined. To determine the security level, the script azenv.php is used, an example of which is also in this repository. Using the scanned proxy, a request is made to one of the internet copies of the script assigned as the judge and the HTTP headers reaching the target are scanned. The security levels of the Rated Proxies are listed below. The main difference that separates these three proxy types is the level of security and privacy they offer.

Hint: When proxyprof is used with the -g (good) option, only servers with the minimum security level specified by this parameter are included in the result set.

Proxy Security Levels Level 3: Transparent proxies do not hide your IP Address and they don’t alter any user information. Level 2: An anonymous proxy does not reveal your IP address but does reveal that you are using a proxy server. Level 1: Elite proxy servers hide both your IP address and the fact that you are using a proxy server at all.

-n <num> Thread count. Default: 250. proxyprof can perform multiple simultaneous scans with low resource requirements. This saves a lot of time, especially when tens of thousands of proxies need to be scanned.

Hint 1: The firewall on your line may be configured against opening a large number of TCP connections in a short time. Especially when scanning SOCKS4/SOCKS5 servers, it opens a lot of sockets in a short time. If you get a meaningless amount of failed scan results, try again by reducing the number of threads. For example, set the number of threads between 1-5. The default value is 250.

Hint 2: If you get PHP memory allocate error, reduce the number of threads or increase the memory limit that can be used with the -d parameter of the php interpreter. For example php -d memory_limit=500MB script_to_run.php

-c <secs> Connection timeout. Default: 5 secs. During the handshake process with a proxy, it waits for a certain maximum amount of time to respond to the connection request. Otherwise, the connection will remain open for a long time, causing excessive resource consumption and reduced browsing speed. If the time defined by this parameter is exceeded, it is judged that the proxy is not responding. A good proxy should respond instantly and quickly.

-a <URL> Blocking test URL. Ex. cloudflare.com protected web service. Especially since proxy servers open to public use are used by many people for many different purposes, they can easily fall into the blacklists of protection systems. This option checks if the proxy is blacklisted by a particular network/server. An attempt is made to connect to the URL address specified with this parameter using a proxy, and at the end the result is listed as blocked or unblocked. This option becomes a mandatory condition when used with -g (good) and only unblocked addresses are included in the result set.

-j <URL>
Judge URL. Default: random azenv.php. The Judge URL is accessed using the proxy and reflects back client information that the proxy carries with http headers. There are already many judge URLs in proxyprof's list and choose one of them at the start of the scan. You can see a list of Judge URLs in the source code. If you want to use a custom Judge url use this parameter. A judge file that proxyprof is compatible with has been shared in the repository with the name azenv.php.

-s
Silent. No any output.

-g List only good proxies. This means scan results match with scan criterias such as timeout, proxy security level and blocking test results.

-r Show progress bar.

Examples

Scans socks4 proxy list from socks4.lst file and display scan results.

    $ php proxyprof.php -t https -f socks4.lst

Scans https proxy list from https.lst file and display scan results, save good proxies to goodhttps.lst in IP:PORT format.

    $ php proxyprof.php -t https -f https.lst -o goodhttps.lst

Scans https proxy list from https.lst file and output good proxies to standart display in IP:PORT format.

    $ php proxyprof.php -t https -f https.lst -o STDOUT 

Scan HTTPS proxy server list in multithreaded (1500 thread) with 20 seconds timeout delay. If proxy is up then reach to URL "https://www.tankado.com/" behind the CloudFlare (CF) network and test blocking or not blocking by CF. Displays only good servers with non blocked in a table.

    $ php proxyprof.php -t https -f https.lst -g -n 1500 -a https://www.tankado.com/ -c 20

If needed, start a SOCKS-5 proxy tunnel:

    $ ssh -D 8080 -C -N -v  [email protected]

Scan two proxy:

    $ php proxyprof.php -t socks4 -p 103.105.41.209:4145,194.27.16.17:62013   

Use STDIN to input scan list example-1:

    $ printf "31.44.82.182:5678\n185.139.56.133:4145" | php proxycheck.php -t socks4 -n 1000 

Use STDIN to input scan list example-2:

    $ cat socks4.lst | php proxycheck.php -t socks4 -n 1000 -g

Disclaimer

This is an open source for everyone, you may redistribute, modify, use patents and use privately without any obligation to redistribute. but it should be noted to include the source code of the library that was modified (not the source code of the entire program), include the license, include the original copyright of the author (Özgür Koca), and include any changes made (if modified). Users do not have the right to sue the creator when there is damage to the software or even demand if there is a problem caused by the makers of this tool. because every risk is caused by the user risk itself.

About Proxies

HTTP proxies

HTTPS proxies generally support HTTP, but not vice versa. For the most protection, while browsing the internet, an elite proxy is the best choice. That doesn’t mean transparent and anonymous don’t have their uses. Public elite proxies are more overloaded than transparent servers, so if you were looking for something that loads pages faster but aren’t concerned about privacy, then a transparent proxy would be the best choice. The best proxy option is determined by your needs.

SOCKS4 and SOCKS5 proxies

SOCKS is a layer 5 protocol, and it doesn’t care about anything below that layer in the Open Systems Interconnection (OSI) model — meaning you can’t use it to tunnel protocols operating below layer 5. This includes things such as ping, Address Resolution Protocol (ARP), etc. From a security perspective, it won’t allow an attacker to perform scans using tools such as Nmap if they are scanning based on half-open connections because it works at layer 5.

Since SOCKS sits at layer 5, between SSL (layer 7) and TCP/UDP (layer 4), it can handle several request types, including HTTP, HTTPS, POP3, SMTP and FTP. As a result, SOCKS can be used for email, web browsing, peer-to-peer sharing, file transfers and more.

Other proxies built for specific protocols at layer 7, such as an HTTP proxy that is used to interpret and forward HTTP or HTTPS traffic between client and server, are often referred to as application proxies. There are only two versions: SOCKS4 and SOCKs5. The main differences between SOCKs5 and SOCKS4 are:

SOCKS4 doesn’t support authentication, while SOCKs5 supports a variety of authentication methods; and SOCKS4 doesn’t support UDP proxies, while SOCKs5 does. A SOCKs5 proxy is more secure because it establishes a full TCP connection with authentication and uses the Secure Shell (SSH) encrypted tunneling method to relay the traffic.

SOCKS5 supports multiple authentication methods, SOCKS4 does not support authentication; SOCKS5 supports UDP proxy, SOCKS4 does not support UDP proxy; SOCKS5 is more secure because it uses an authenticated TCP connections and SSH encrypted tunnels;

Star History

Star History Chart

Donation

Would you like to buy me a coffee? Click.

Author

I'm Özgür. I'm a teacher at a vocational school Repos: https://github.com/enseitankado Blog: www.tankado.com

You might also like...
⚓️ Easily test HTTP webhooks with this handy tool that displays requests instantly.

Webhook.site With Webhook.site, you instantly get a unique, random URL that you can use to test and debug Webhooks and HTTP requests, as well as to cr

A Magento 1.x module which facilitates automatic purging of static assets from HTTP caches such as browser cache, CDN, Varnish, etc using best practices outlined within the HTML5 boilerplate community.

Magento Cachebuster Cachebuster is a Magento module which facilitates automatic purging of static assets from HTTP caches such as browser cache, CDN,

Artax is an asynchronous HTTP client for PHP based on Amp

Artax is an asynchronous HTTP client for PHP based on Amp. Its API simplifies standards-compliant HTTP resource traversal and RESTful web service consumption without obscuring the underlying protocol. The library manually implements HTTP over TCP sockets; as such it has no dependency on ext/curl.

This repository demonstrates exemplary implementation of chat using HTTP and Websocket servers in PHP using Kraken Framework components.
This repository demonstrates exemplary implementation of chat using HTTP and Websocket servers in PHP using Kraken Framework components.

This repository demonstrates exemplary implementation of chat using HTTP and Websocket servers in PHP using Kraken Framework components.

A Laravel artisan based package to create the AWS (SES + SNS) infrastructure to receive email event notifications with Http/Https endpoint.
A Laravel artisan based package to create the AWS (SES + SNS) infrastructure to receive email event notifications with Http/Https endpoint.

Laravel SES Tracking Setup the AWS infrastructure to handle email events using SES/SNS and http/s endpoints with a single Laravel artisan command. Thi

An alternative to run cron jobs that uses simple HTTP requests

SilverStripe Simple Jobs An alternative to run cron jobs that uses simple HTTP requests. This module require SilverStripe CronTask. Why? Configuring c

Integrate reCAPTCHA using async HTTP/2, making your app fast with a few lines.
Integrate reCAPTCHA using async HTTP/2, making your app fast with a few lines.

ReCaptcha Integrate reCAPTCHA using async HTTP/2, making your app fast with a few lines. use Illuminate\Support\Facades\Route; Route::post('login', f

Simple HTTP smoke testing for your Symfony application

Shopsys HTTP Smoke Testing This package enables you to do simple HTTP smoke testing of your Symfony application. Basically, it generates a HTTP reques

A simple package to send HTTP header responses ✨

PHP HTTP Response Simple PHP package to easily send the right HTTP header responses to the browser 🐘 Requirement PHP v8.0 or higher 🚀 Installation T

Owner
Özgür Koca
mount /dev/brain || tail -f /var/log/thoughts >> /pub/www
Özgür Koca
A multithreaded application server for PHP, written in PHP.

appserver.io, a PHP application server This is the main repository for the appserver.io project. What is appserver.io appserver.io is a multithreaded

appserver.io 951 Dec 25, 2022
A simple HTTP server behaving as proxy between webhooks and Appwrite Functions.

A simple HTTP server behaving as proxy between webhooks and Appwrite Functions, allowing for instance Stripe payments integration into Appwrite.

Matej Bačo 21 Nov 30, 2022
Integrate your PHP application with your HTTP caching proxy

FOSHttpCache Introduction This library integrates your PHP applications with HTTP caching proxies such as Varnish. Use this library to send invalidati

FriendsOfSymfony 338 Dec 8, 2022
Yclas Self Hosted is a powerful script that can transform any domain into a fully customizable classifieds site within a few seconds.

Yclas 4.4.0. Description Yclas self-hosted is a powerful script that can transform any domain into a fully customizable classifieds site within a few

Yclas 299 May 29, 2022
Repman - PHP Repository Manager: packagist proxy and host for private packages

Repman - PHP Repository Manager Repman is a PHP repository manager. Main features: free and open source works as a proxy for packagist.org (speeds up

Repman 438 Jan 2, 2023
Proxy Judge coded In PHP

Simple proxy judge created in PHP What is a Proxy Judge ? A ProxyJuge is usually a PHP script that returns a subset of the environment variables of th

CHINO TECH TOOLS 3 Sep 6, 2021
Proxy based Redis cluster solution supporting pipeline and scaling dynamically

Codis is a proxy based high performance Redis cluster solution written in Go. It is production-ready and widely used at wandoujia.com and many compani

null 12.7k Jan 2, 2023
Bitcoin Faucet integrated with banlist and VPN/Proxy Shield

Bitcoin Faucet integrated with banlist and VPN/Proxy Shield. It uses the service of Google reCaptcha (v2; box) and IPHub. Any claims will be saved in the account balance and can be withdrawn to ExpressCrypto, FaucetPay or directly using Block.io

null 2 Dec 18, 2022
urldecode'ing of all HTTP parameters in Lumen project

Request UrlDecode Description This package is intended to perform urldecode of all HTTP parameters in Lumen project. Lumen for some reason does not do

null 1 Dec 13, 2021
🏆 Learn You PHP! - An introduction to PHP's core features: i/o, http, arrays, exceptions and so on.

Learn You PHP! The very first PHP School workshop. A revolutionary new way to learn PHP Bring your imagination to life in an open learning eco-system

PHP School 311 Dec 30, 2022