root 3 órája
szülő
commit
f1f30a71c9

+ 116 - 2
config/config.json

@@ -1,6 +1,6 @@
 {
     "redis": {
-        "host": "45.137.220.138",
+        "host": "text.skin",
         "port": 6379,
         "db": 0,
         "password": "STEs2x6ML0U1HlpE9SojM6YU7QPhqzY8"
@@ -971,7 +971,7 @@
         {
             "identifier": "tls.gb.fr",
             "debug": false,
-            "enable": true,
+            "enable": false,
             "need_account": true,
             "need_proxy": true,
             "proxy_pool": ["proxy-cheap"],
@@ -1025,6 +1025,120 @@
                 }
             }
         },
+        {
+            "identifier": "tls.cn.bjs.fr",
+            "debug": false,
+            "enable": true,
+            "need_account": true,
+            "need_proxy": true,
+            "proxy_pool": ["decodo"],
+            "proxy_cd": 900,
+            "session_max_life": 1800,
+            "sentinel": {
+                "account_source": "built-in",
+                "account_pool_id": "tls.cn.bjs.fr.sentinel",
+                "target_instances": 3,
+                "account_cd": 1800,
+                "signal_ttl": 30
+            },
+            "booker": {
+                "account_source": "order",
+                "target_instances": 3,
+                "account_cd": 1800,
+                "booking_cooldown": 10,
+                "max_bookings_per_account": 1
+            },
+            "query_wait": {
+                "mode": "Random",
+                "fixed_wait": 10,
+                "random_min": 55,
+                "random_max": 65
+            },
+            "plugin_config": {
+                "lib_path": "plugins",
+                "plugin_name": "tls_plugin",
+                "plugin_bin": "tls_plugin.py",
+                "plugin_proto": "IVSPlg"
+            },
+            "appointment_types": [
+                {
+                    "weight": 10,
+                    "routing_key": "slot.bjs.fr.tourist",
+                    "city": "Beijing",
+                    "visa_type": "Tourist",
+                    "country": "France"
+                }
+            ],
+            "website": "https://visas-fr.tlscontact.com/en-us/country/cn/vac/cnBJS2fr",
+            "free_config": {
+                "tls_url": "https://visas-fr.tlscontact.com/en-us/country/cn/vac/cnBJS2fr",
+                "location": "Beijing",
+                "capsolver_key": "CAP-5441DD341DD3CC2FAEF0BE6FE493EE9A",
+                "login_captcha": {
+                    "solve_advance": false,
+                    "site_key": "6LcDpXcfAAAAAM7wOEsF_38DNsL20tTvPTKxpyn0",
+                    "page_url": "https://i2-auth.visas-fr.tlscontact.com",
+                    "task": "ReCaptchaV2TaskProxyLess"
+                }
+            }
+        },
+        {
+            "identifier": "tls.cn.sha.fr",
+            "debug": false,
+            "enable": true,
+            "need_account": true,
+            "need_proxy": true,
+            "proxy_pool": ["decodo"],
+            "proxy_cd": 900,
+            "session_max_life": 1800,
+            "sentinel": {
+                "account_source": "built-in",
+                "account_pool_id": "tls.cn.sha.fr.sentinel",
+                "target_instances": 3,
+                "account_cd": 1800,
+                "signal_ttl": 30
+            },
+            "booker": {
+                "account_source": "order",
+                "target_instances": 3,
+                "account_cd": 1800,
+                "booking_cooldown": 10,
+                "max_bookings_per_account": 1
+            },
+            "query_wait": {
+                "mode": "Random",
+                "fixed_wait": 10,
+                "random_min": 55,
+                "random_max": 65
+            },
+            "plugin_config": {
+                "lib_path": "plugins",
+                "plugin_name": "tls_plugin",
+                "plugin_bin": "tls_plugin.py",
+                "plugin_proto": "IVSPlg"
+            },
+            "appointment_types": [
+                {
+                    "weight": 10,
+                    "routing_key": "slot.sha.fr.tourist",
+                    "city": "Shanghai",
+                    "visa_type": "Tourist",
+                    "country": "France"
+                }
+            ],
+            "website": "https://visas-fr.tlscontact.com/en-us/country/cn/vac/cnSHA2fr",
+            "free_config": {
+                "tls_url": "https://visas-fr.tlscontact.com/en-us/country/cn/vac/cnSHA2fr",
+                "location": "Shanghai",
+                "capsolver_key": "CAP-5441DD341DD3CC2FAEF0BE6FE493EE9A",
+                "login_captcha": {
+                    "solve_advance": false,
+                    "site_key": "6LcDpXcfAAAAAM7wOEsF_38DNsL20tTvPTKxpyn0",
+                    "page_url": "https://i2-auth.visas-fr.tlscontact.com",
+                    "task": "ReCaptchaV2TaskProxyLess"
+                }
+            }
+        },
         {
             "identifier": "tls.ie.fr",
             "debug": false,

+ 3 - 5
sentinel.py

@@ -27,6 +27,7 @@ class SentinelGCO:
         # 1. 全局建连退避:起步 1 分钟,封顶 1 小时 (保护登录接口)
         self.group_backoff = ExponentialBackoff(base_delay=60.0, max_delay=3600.0, factor=2.0)
         self.m_last_spawn_time = 0.0
+        self.m_spawn_interval = 120
         self.m_last_group_query_time = 0.0
 
     def _log(self, message):
@@ -209,13 +210,10 @@ class SentinelGCO:
             
             if (current + pending) < target:
                 now = time.time()
-                avg_interval = self._get_average_interval()
-                stagger_delay = avg_interval / max(1, target)
-                stagger_delay = max(10.0, stagger_delay)
-                if now - self.m_last_spawn_time >= stagger_delay:
+                if now - self.m_last_spawn_time >= self.m_spawn_interval:
                     with self.m_lock:
                         self.m_last_spawn_time = now
-                    self._log(f"Staggered spawn triggered. Next spawn in {stagger_delay:.1f}s")
+                    self._log(f"Staggered spawn triggered. Next spawn in {self.m_spawn_interval:.1f}s")
                     self._spawn_sentinel_worker()
 
     def _spawn_sentinel_worker(self):

+ 1 - 1
test/test_publish_slot.py

@@ -3,7 +3,7 @@ import redis
 
 # Redis 连接
 r = redis.Redis(
-    host="45.137.220.138",
+    host="text.skin",
     port=6379,
     db=0,
     password="STEs2x6ML0U1HlpE9SojM6YU7QPhqzY8",

+ 1 - 1
tls_registration_bot.py

@@ -572,7 +572,7 @@ class TlsRegistrator:
         """
         将注册成功的账号上报到中心服务器
         """
-        api_url = 'https://visafly.top/api/account/add'
+        api_url = 'https://api.text.skin/api/account/add'
         api_token = 'tok_e946329a60ff45ba807f3f41b0e8b7fc'  # 你的 Bearer Token
 
         # 构造请求头

+ 2 - 2
toolkit/vs_cloud_api.py

@@ -20,7 +20,7 @@ class VSCloudApi:
         if cls._instance is None:
             cls._instance = super(VSCloudApi, cls).__new__(cls)
             # 初始化默认配置
-            cls._instance.base_url = "https://visafly.top"
+            cls._instance.base_url = "https://api.text.skin"
             cls._instance.api_token = "Bearer tok_e946329a60ff45ba807f3f41b0e8b7fc"
             cls._instance.session = requests.Session()
         return cls._instance
@@ -119,7 +119,7 @@ class VSCloudApi:
     def push_weixin_text(self, text:str):
         """
         推送微信文本消息
-        API: POST https://visafly.top/api/wechat/send_no_token
+        API: POST https://api.text.skin/api/wechat/send_no_token
         """
         url = f"{self.base_url}/api/wechat/send_no_token"
         payload = {"message": text}

+ 1 - 1
tools/proxy_uploader.py

@@ -2,7 +2,7 @@ import requests
 from datetime import datetime, timezone
 
 # --- 配置部分 ---
-API_URL = 'https://visafly.top/api/proxy/create'
+API_URL = 'https://api.text.skin/api/proxy/create'
 BEARER_TOKEN = 'tok_e946329a60ff45ba807f3f41b0e8b7fc'    # 替换为你的真实 Token
 FILE_PATH = '../config/decodo.txt'   # 替换为你实际的文本文件名 (例如 proxies.txt)
 

+ 2 - 2
vfs_registration_bot.py

@@ -42,7 +42,7 @@ def upload_account_to_server(account):
     """
     将注册成功的账号上报到中心服务器
     """
-    api_url = 'https://visafly.top/api/account/add'
+    api_url = 'https://api.text.skin/api/account/add'
     api_token = 'tok_e946329a60ff45ba807f3f41b0e8b7fc'  # 你的 Bearer Token
 
     # 构造请求头
@@ -325,7 +325,7 @@ class VFSRegistrationBot:
                     "expiry": str(60)
                 }
         
-                url = f"https://visafly.top/api/email-authorizations/fetch"
+                url = f"https://api.text.skin/api/email-authorizations/fetch"
                 headers =  {
                     "Authorization": "Bearer tok_e946329a60ff45ba807f3f41b0e8b7fc",
                     "Content-Type": "application/json",