-
Notifications
You must be signed in to change notification settings - Fork 49
Maintaining Optimal IP Coefficient for Gaganode
To ensure optimal earnings in Gaganode, it is essential to manage IP addresses effectively. Here are the key points to consider:
Each IP address must be unique and from a different subnet to achieve an IP coefficient of 1.
Using two IP addresses from the same subnet reduces the IP coefficient. Refer to the attached image for details on how the coefficient is affected.
A lower IP coefficient can lead to a decrease in overall rewards.
Verify that each IP address has an IP coefficient of 1 to maintain consistent earnings.
If you have added two IP addresses from the same subnet and then delete one, it can take up to 24 hours for the new IP coefficient to be updated.
If another user is using an IP address from the same subnet as yours, it can also impact your earnings.
The following script removes IP addresses from the same subnet to increase the reward rate. By following these guidelines, you can ensure that your IP addresses contribute to maintaining the highest possible earnings. Just save this to .sh file and give permissions before running it. Input file is proxies.txt and output file after filtering the proxies is saved to filtered_proxies.txt. Copy the proxies from filtered_proxies.txt and use it.
#!/bin/bash
# Input file containing proxies, each in the format protocol://USER:PASSWORD@IP:PORT or protocol://IP:PORT
input_file="proxies.txt"
# Output file for sorted and filtered proxies
output_file="filtered_proxies.txt"
# Regular expression to match IP addresses
ip_regex='([0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3})'
# Sort proxies by IP address
sort_proxies() {
awk -v ip_regex="$ip_regex" 'match($0, ip_regex) { ip=substr($0, RSTART, RLENGTH); print ip, $0 }' "$input_file" | sort -n | awk '{$1=""; print $0}'
}
# Filter out duplicates based on IP address
filter_proxies() {
last_subnet=""
while IFS= read -r line; do
# Extract IP from the line
ip=$(echo "$line" | grep -E -o "$ip_regex")
# Determine the subnet of the current IP
current_subnet=$(echo "$ip" | awk -F. '{print $1 "." $2 "." $3}')
# Print the line if it's the first occurrence of the subnet
if [ "$current_subnet" != "$last_subnet" ]; then
echo "$line"
last_subnet="$current_subnet"
fi
done
}
# Check if input file exists
if [ ! -f "$input_file" ]; then
echo "Input file '$input_file' not found."
exit 1
fi
# Sort proxies and filter duplicates
sort_proxies | filter_proxies > "$output_file"
echo "Proxies sorted based on IP address, duplicates removed, and saved to '$output_file'."