-
Notifications
You must be signed in to change notification settings - Fork 48
Formatting proxies to user:password@ip:port
engageub edited this page Jun 30, 2023
·
5 revisions
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
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
sed -i -E 's|([^:/]+)://([^:]+):([^:]+):([^:]+):([^:/]+)|\1://\2:\3@\4:\5|g' proxies.txt
sed -i -E 's|([^:/]+)://([^:]+):([^:]+):([^:]+):([^:/]+)|\1://\4:\5@\2:\3|g' proxies.txt
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