For those who are interested in using a mining proxy that works with most mining pools has a nice GUI and is very stable -- I would recommend
Antproxy, yes, despite how much I hate Bitmain, I find their proxy to be the most stable free proxy out there, and I have been using it for a few years now without an issue (it does crash like once every a few months for reasons which I have not confirmed yet, but I wrote a script to "fix" it and it's included below)
![](https://ip.bitcointalk.org/?u=https%3A%2F%2Fwww.talkimg.com%2Fimages%2F2024%2F02%2F14%2Fvljkq.png&t=665&c=nliie8V2qH7_Yg)
Here is how the GUI looks.
The
installation is rather simple
Log scriptimport requests
import subprocess
import time
import traceback
# Construct the path for the log file in the "Documents" folder
log_file_path = r'C:\Users\Public\Documents\log_file.txt'
def log(message):
try:
with open(log_file_path, 'a') as log_file:
log_file.write(message + '\n')
except PermissionError as e:
print(f"PermissionError: {e}")
traceback.print_exc()
except Exception as ex:
print(f"Exception during logging: {ex}")
traceback.print_exc()
def restart_windows():
try:
print("Restarting Windows in 15 seconds...")
time.sleep(15)
subprocess.run(['shutdown', '/r', '/t', '1'])
except Exception as e:
log(f"Exception during restart_windows: {e}")
traceback.print_exc()
def check_hashrate():
try:
# Get current date and time
current_datetime = time.strftime("%Y-%m-%d %H:%M:%S")
# Send an HTTP request
response = requests.get('http://127.0.0.1:4444/proxies.json')
# Parse the JSON data
data = response.json()
hashrate = data['Hashrate']
print(f"{current_datetime} - Hashrate: {hashrate}")
log(f"{current_datetime} - Hashrate: {hashrate}") # Log date/time and hashrate information
if hashrate <= 3:
log("Hashrate is below 2. Restarting Windows...")
restart_windows()
except Exception as ex:
# Log the exception message with stack trace
log(f"Exception during check_hashrate: {ex}")
traceback.print_exc()
def check_ping():
try:
# Get current date and time
current_datetime = time.strftime("%Y-%m-%d %H:%M:%S")
# Send a ping request
response = subprocess.run(['ping', '-n', '1', 'www.google.com'], capture_output=True, text=True)
# Extract average ping result from the response
ping_result = response.stdout.splitlines()[-1].split('=')[-1].strip()
print(f"{current_datetime} - Ping Result: {ping_result}")
log(f"{current_datetime} - Ping Result: {ping_result}") # Log date/time and average ping result
except Exception as ex:
# Log the exception message with stack trace
log(f"Exception during check_ping: {ex}")
traceback.print_exc()
try:
while True:
# Check hashrate every 60 seconds
check_hashrate()
# Check ping to www.google.com every 10 seconds
for _ in range(6):
check_ping()
time.sleep(10)
except KeyboardInterrupt:
print("\nScript stopped by user.")
except Exception as ex:
# Log any unexpected exception
log(f"Unexpected exception: {ex}")
traceback.print_exc()
# Pause before exiting
time.sleep(5)
After years of using it, I found it's missing a major function which is "logs", if something happens you just have noway of knowing what was it or when did it happen, also as mentioned above in the rare events of the proxy freezing or throwing some error which is usually due to internet connection loss, the script will reboot the PC because that seems like the easiest fix for the freezing issue given that closing/reopning the proxy might not fix all issues.
The above script will do the following:
1-log the proxy info to C:\Users\Public\Documents\log_file.txt >> you can change the txtfile or remove the whole function if you want.
2-Get the current hashrate reported by the proxy every 60 seconds, display and log the results -- restart the PC if the hashrate is below x (x is 3PH in the code, you may change it to whatever your hashrate is)
3-Ping google every 10 seconds, display and log the results
The log file my scprit creates will be like this
![](https://ip.bitcointalk.org/?u=https%3A%2F%2Fwww.talkimg.com%2Fimages%2F2024%2F02%2F14%2Fvlgn9.png&t=665&c=uPDUMLQX12TMXA)
You may not need to ping every 10 seconds, but I like it this way, I can come back anytime and see if my internet has dropped at any moment or ping time increases.
Obivosully you need to create a a batch file (a txtfile change to .bat) hosted in your startup folder which runs the script with a command like
echo off
TIMEOUT /T 600
python C:\Users\M\Desktop\pyton\testscript.py
pause
You would also need to put a shortcut to the proxy executable in the startup folder so that it runs when your PC boots.
Pools I have tested and remember to work:
Viabtc
Kano.is
Antpool
Binance
*if you have any questions regarding mining proxies in general or a technical issue running this partiuclar one, feel free to ask here.