fix: change desktop pet port 51983->41983 (avoid Hyper-V reserved range) & update wechat group QR code

This commit is contained in:
Liang Jiaqing
2026-04-15 23:50:48 +08:00
parent bdd2f3c2cd
commit 39f90149fb
4 changed files with 3 additions and 3 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 165 KiB

After

Width:  |  Height:  |  Size: 157 KiB

View File

@@ -3,7 +3,7 @@ import tkinter as tk, threading, random, os, sys
from http.server import HTTPServer, BaseHTTPRequestHandler
from urllib.parse import urlparse, parse_qs
PORT = 51983
PORT = 41983
GIF = os.path.join(os.path.dirname(os.path.abspath(sys.argv[0])), 'pet.gif')
class Pet:

View File

@@ -4,7 +4,7 @@ from http.server import HTTPServer, BaseHTTPRequestHandler
from urllib.parse import urlparse, parse_qs
from PIL import Image, ImageDraw, ImageFont, ImageOps
PORT = 51983
PORT = 41983
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PROJECT_DIR = os.path.dirname(SCRIPT_DIR)
SKINS_DIR = os.path.join(SCRIPT_DIR, 'skins')

View File

@@ -50,7 +50,7 @@ def render_sidebar():
subprocess.Popen([sys.executable, pet_script], **kwargs)
def _pet_req(q):
def _do():
try: urlopen(f'http://127.0.0.1:51983/?{q}', timeout=2)
try: urlopen(f'http://127.0.0.1:41983/?{q}', timeout=2)
except Exception: pass
threading.Thread(target=_do, daemon=True).start()
agent._pet_req = _pet_req