wehb dash!
This commit is contained in:
BIN
MINE/rin/__pycache__/pool_web_interface.cpython-312.pyc
Normal file
BIN
MINE/rin/__pycache__/pool_web_interface.cpython-312.pyc
Normal file
Binary file not shown.
@@ -248,7 +248,7 @@ class PoolWebHandler(BaseHTTPRequestHandler):
|
||||
# Suppress access logs
|
||||
pass
|
||||
|
||||
def start_web_interface(pool_db, host='0.0.0.0', port=8080):
|
||||
def start_web_interface(pool_db, host='0.0.0.0', port=8083):
|
||||
"""Start the web interface server"""
|
||||
interface = PoolWebInterface(pool_db, host, port)
|
||||
|
||||
@@ -256,12 +256,18 @@ def start_web_interface(pool_db, host='0.0.0.0', port=8080):
|
||||
def __init__(self, *args, **kwargs):
|
||||
super().__init__(*args, pool_interface=interface, **kwargs)
|
||||
|
||||
server = HTTPServer((host, port), Handler)
|
||||
print(f"🌐 Web interface running on http://{host}:{port}")
|
||||
print("Press Ctrl+C to stop")
|
||||
|
||||
try:
|
||||
server = HTTPServer((host, port), Handler)
|
||||
print(f"🌐 Web interface running on http://{host}:{port}")
|
||||
print("Press Ctrl+C to stop")
|
||||
|
||||
server.serve_forever()
|
||||
except OSError as e:
|
||||
if "Address already in use" in str(e):
|
||||
print(f"⚠️ Port {port} is already in use, web interface not started")
|
||||
print(f"💡 Try a different port or kill the process using port {port}")
|
||||
else:
|
||||
print(f"❌ Failed to start web interface: {e}")
|
||||
except KeyboardInterrupt:
|
||||
print("\n🛑 Shutting down web interface...")
|
||||
server.shutdown()
|
||||
|
@@ -60,6 +60,7 @@ echo "- Multiple miner support"
|
||||
echo "- Share-based reward distribution"
|
||||
echo "- Pool fee: 1%"
|
||||
echo "- Real-time statistics"
|
||||
echo "- Web dashboard on port 8083"
|
||||
echo ""
|
||||
|
||||
echo "After it starts, miners can connect with:"
|
||||
@@ -73,6 +74,9 @@ echo ""
|
||||
echo "Option 3: Traditional username (rewards to pool address)"
|
||||
echo "./cpuminer -a rinhash -o stratum+tcp://YOUR_IP:3333 -u username.workername -p x"
|
||||
echo ""
|
||||
echo "🌐 Web Dashboard: http://YOUR_IP:8083"
|
||||
echo "📊 View real-time pool statistics, miners, and blocks"
|
||||
echo ""
|
||||
echo "Press Ctrl+C to stop the pool"
|
||||
|
||||
# Start the mining pool
|
||||
|
@@ -603,6 +603,12 @@ class RinCoinMiningPool:
|
||||
stats_thread = threading.Thread(target=self.stats_updater, daemon=True)
|
||||
stats_thread.start()
|
||||
|
||||
# Start web interface in background
|
||||
web_thread = threading.Thread(target=start_web_interface, args=(self.db, '0.0.0.0', 8083), daemon=True)
|
||||
web_thread.start()
|
||||
|
||||
print(f"🌐 Web dashboard started on http://0.0.0.0:8083")
|
||||
|
||||
# Start Stratum server
|
||||
server_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
||||
server_socket.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
|
||||
|
Reference in New Issue
Block a user