Formatting proxies to user:password@ip:port - engageub/InternetIncome GitHub Wiki
The following are the accepted formats for Internet Income script. For any other format you will need to convert them to this format using the commands mentioned below.
protocol://user:password@ip:port
protocol://ip:port
Adding prefix to each line if protocol does not exist
If your provider did not provide protocol at the beginning of each proxy after downloading, use the following to add it.
- To add http:// prefix before each line run the following command
sed -i 's/^/http:\/\//' proxies.txt
- To add socks5:// prefix before each line run the following command
sed -i 's/^/socks5:\/\//' proxies.txt
Run the following command to convert protocol://user:password:ip:port
sed -i -E 's|([^:/]+)://([^:]+):([^:]+):([^:]+):([^:/]+)|\1://\2:\3@\4:\5|g' proxies.txt
Run the following command to convert protocol://ip:port:user:password
sed -i -E 's|([^:/]+)://([^:]+):([^:]+):([^:]+):([^:/]+)|\1://\4:\5@\2:\3|g' proxies.txt
Run the following command to convert protocol://ip:port@user:password
sed -i -E 's|([^:/]+)://([^:@]+):([^@]+)@([^:/]+):([^/]+)|\1://\4:\5@\2:\3|g' proxies.txt
After converting the proxies, please open proxies.txt file and make sure the format has been changed to protocol://user:password@ip:port