SNIPPET: LOAD VALID PROXIES & CHANGE PROXY

Proxy Change SnippetBellow is a simple snippet which will load valid proxies from TXT file and make them ready to be used inside UBot. Proxies are loaded to a list with name %PROXIES and whenever we want to change a proxy we just need to tell UBot which list item should be used as proxy.

COMMANDS

PROXIES LOAD

“PROXIS LOAD” command loads valid proxies ( in format “127.0.0.1:80” or “127.0.0.1:80:username:password) from “proxies.txt” file located in the same folder as .ubot file (#FOLDER Root).

 

PROXY CHANGE

This is the basic command which is used in both “PROXY CHANGE” commands bellow.

PROXY CHANGE Input Parameters

  • #PROXIES Row – tells the command which list row should be used for getting the next proxy string

Once this command gets executed we first get a proxy string from a list (determined by input parameter#PROXIES Row ). Once we have it, we break down the string to 3 parts: proxy:port, username and password; if either of last 2 is not defined, we skip the part where we “set proxy credentials” and only “change proxy” commands gets executed.

 

PROXY CHANGE RANDOM

Changes proxy while using a random proxy/list item. Random proxy is selected by first getting a random number with $rand function and then passing that number as list position parameter.

 

PROXY CHANGE CYCLIC

Changes proxies in cyclic fashion, meaning that it start with proxy/list item #1, proceeds with #2….once the last proxy is reached, the code will pick the first proxy again.

 

SNIPPET AND TEST CODE:

 

HOW TO USE:

Copy and paste the code above into UBot Studio, save the UBOT file to any folder and place your poxies into “proxies.txt” file that should be in the same folder as the UBot file you just saved. From there on you just need to load proxies via “PROXIES LOAD” command and you are ready to change proxies.

If you like this snippet or have any questions or suggestions, please feel free to leave a comment or subscribe to the RSS feed to have future snippets delivered to your feed reader.

2 thoughts on “SNIPPET: LOAD VALID PROXIES & CHANGE PROXY

Leave a Reply

Your email address will not be published. Required fields are marked *

*