jerry hace 1 mes
padre
commit
390e033832

+ 1 - 1
Dockerfile

@@ -68,7 +68,7 @@ RUN chmod +x /entrypoint.sh
 COPY . .
 
 # 6. 创建临时目录权限
-RUN mkdir -p /app/temp_browser_data && chmod 777 /app/temp_browser_data
+RUN mkdir -p /app/data/temp_browser_data && chmod 777 /app/data/temp_browser_data
 
 # 7. 入口点
 ENTRYPOINT ["/usr/bin/dumb-init", "--"]

+ 38 - 38
config/config.json

@@ -9,7 +9,7 @@
         {
             "identifier": "vfs.ie.nl",
             "debug": false,
-            "enable": false,
+            "enable": true,
             "need_account": true,
             "need_proxy": true,
             "proxy_pool": "isp_all",
@@ -78,7 +78,7 @@
             "enable": true,
             "need_account": true,
             "need_proxy": true,
-            "proxy_pool": "local",
+            "proxy_pool": "isp_all",
             "proxy_cd": 5,
             "session_max_life": 30,
             "sentinel": {
@@ -146,6 +146,7 @@
             "need_proxy": true,
             "proxy_pool": "isp_all",
             "proxy_cd": 5,
+            "session_max_life": 30,
             "sentinel": {
                 "account_source": "built-in",
                 "account_pool_id": "au.fr.sentinel",
@@ -161,7 +162,6 @@
                 "booking_cooldown": 10,
                 "max_bookings_per_account": 8
             },
-            "session_max_life": 30,
             "query_wait": {
                 "mode": "Random",
                 "fixed_wait": 10,
@@ -223,11 +223,12 @@
         {
             "identifier": "vfs.gb.it",
             "debug": false,
-            "enable": false,
+            "enable": true,
             "need_account": true,
             "need_proxy": true,
             "proxy_pool": "isp_all",
             "proxy_cd": 5,
+            "session_max_life": 30,
             "sentinel": {
                 "account_source": "built-in",
                 "account_pool_id": "gb.it.sentinel",
@@ -238,12 +239,11 @@
             "booker": {
                 "account_source": "built-in",
                 "account_pool_id": "gb.it.booker",
-                "target_instances": 1,
+                "target_instances": 0,
                 "account_cd": 180,
                 "booking_cooldown": 10,
                 "max_bookings_per_account": 8
             },
-            "session_max_life": 30,
             "query_wait": {
                 "mode": "Random",
                 "fixed_wait": 10,
@@ -305,11 +305,12 @@
         {
             "identifier": "vfs.gb.nl",
             "debug": false,
-            "enable": false,
+            "enable": true,
             "need_account": true,
             "need_proxy": true,
             "proxy_pool": "isp_all",
             "proxy_cd": 5,
+            "session_max_life": 30,
             "sentinel": {
                 "account_source": "built-in",
                 "account_pool_id": "gb.nl.sentinel",
@@ -325,7 +326,6 @@
                 "booking_cooldown": 10,
                 "max_bookings_per_account": 8
             },
-            "session_max_life": 30,
             "query_wait": {
                 "mode": "Random",
                 "fixed_wait": 10,
@@ -387,11 +387,12 @@
         {
             "identifier": "vfs.gb.no",
             "debug": false,
-            "enable": false,
+            "enable": true,
             "need_account": true,
             "need_proxy": true,
             "proxy_pool": "isp_all",
             "proxy_cd": 5,
+            "session_max_life": 30,
             "sentinel": {
                 "account_source": "built-in",
                 "account_pool_id": "gb.no.sentinel",
@@ -407,7 +408,6 @@
                 "booking_cooldown": 10,
                 "max_bookings_per_account": 8
             },
-            "session_max_life": 30,
             "query_wait": {
                 "mode": "Random",
                 "fixed_wait": 10,
@@ -453,11 +453,12 @@
         {
             "identifier": "vfs.ie.at",
             "debug": false,
-            "enable": false,
+            "enable": true,
             "need_account": true,
             "need_proxy": true,
-            "proxy_pool": "local",
+            "proxy_pool": "isp_all",
             "proxy_cd": 5,
+            "session_max_life": 30,
             "sentinel": {
                 "account_source": "built-in",
                 "account_pool_id": "ie.at.sentinel",
@@ -473,7 +474,6 @@
                 "booking_cooldown": 10,
                 "max_bookings_per_account": 8
             },
-            "session_max_life": 30,
             "query_wait": {
                 "mode": "Random",
                 "fixed_wait": 10,
@@ -519,11 +519,12 @@
         {
             "identifier": "vfs.ie.dk",
             "debug": false,
-            "enable": false,
+            "enable": true,
             "need_account": true,
             "need_proxy": true,
             "proxy_pool": "isp_all",
             "proxy_cd": 5,
+            "session_max_life": 30,
             "sentinel": {
                 "account_source": "built-in",
                 "account_pool_id": "ie.dk.sentinel",
@@ -539,7 +540,6 @@
                 "booking_cooldown": 10,
                 "max_bookings_per_account": 8
             },
-            "session_max_life": 30,
             "query_wait": {
                 "mode": "Random",
                 "fixed_wait": 10,
@@ -585,11 +585,12 @@
         {
             "identifier": "vfs.ie.fi",
             "debug": false,
-            "enable": false,
+            "enable": true,
             "need_account": true,
             "need_proxy": true,
             "proxy_pool": "isp_all",
             "proxy_cd": 5,
+            "session_max_life": 30,
             "sentinel": {
                 "account_source": "built-in",
                 "account_pool_id": "ie.fi.sentinel",
@@ -605,7 +606,6 @@
                 "booking_cooldown": 10,
                 "max_bookings_per_account": 8
             },
-            "session_max_life": 30,
             "query_wait": {
                 "mode": "Random",
                 "fixed_wait": 10,
@@ -651,11 +651,12 @@
         {
             "identifier": "vfs.ie.hu",
             "debug": false,
-            "enable": false,
+            "enable": true,
             "need_account": true,
             "need_proxy": true,
             "proxy_pool": "isp_all",
             "proxy_cd": 5,
+            "session_max_life": 30,
             "sentinel": {
                 "account_source": "built-in",
                 "account_pool_id": "ie.hu.sentinel",
@@ -671,7 +672,6 @@
                 "booking_cooldown": 10,
                 "max_bookings_per_account": 8
             },
-            "session_max_life": 30,
             "query_wait": {
                 "mode": "Random",
                 "fixed_wait": 10,
@@ -717,11 +717,12 @@
         {
             "identifier": "vfs.ie.is",
             "debug": false,
-            "enable": false,
+            "enable": true,
             "need_account": true,
             "need_proxy": true,
             "proxy_pool": "isp_all",
             "proxy_cd": 5,
+            "session_max_life": 30,
             "sentinel": {
                 "account_source": "built-in",
                 "account_pool_id": "ie.is.sentinel",
@@ -732,12 +733,11 @@
             "booker": {
                 "account_source": "built-in",
                 "account_pool_id": "ie.is.booker",
-                "target_instances": 1,
+                "target_instances": 0,
                 "account_cd": 180,
                 "booking_cooldown": 10,
                 "max_bookings_per_account": 8
             },
-            "session_max_life": 30,
             "query_wait": {
                 "mode": "Random",
                 "fixed_wait": 10,
@@ -783,11 +783,12 @@
         {
             "identifier": "vfs.gb.at",
             "debug": false,
-            "enable": false,
+            "enable": true,
             "need_account": true,
             "need_proxy": true,
-            "proxy_pool": "local",
+            "proxy_pool": "isp_all",
             "proxy_cd": 5,
+            "session_max_life": 30,
             "sentinel": {
                 "account_source": "built-in",
                 "account_pool_id": "gb.at.sentinel",
@@ -803,7 +804,6 @@
                 "booking_cooldown": 10,
                 "max_bookings_per_account": 8
             },
-            "session_max_life": 30,
             "query_wait": {
                 "mode": "Random",
                 "fixed_wait": 10,
@@ -849,11 +849,12 @@
         {
             "identifier": "bls.ie.es",
             "debug": false,
-            "enable": false,
+            "enable": true,
             "need_account": true,
             "need_proxy": true,
             "proxy_pool": "iproyal",
             "proxy_cd": 5,
+            "session_max_life": 60,
             "sentinel": {
                 "account_source": "built-in",
                 "account_pool_id": "ie.es.sentinel",
@@ -863,12 +864,11 @@
             },
             "booker": {
                 "account_source": "order",
-                "target_instances": 1,
+                "target_instances": 0,
                 "account_cd": 180,
                 "booking_cooldown": 10,
                 "max_bookings_per_account": 1
             },
-            "session_max_life": 60,
             "query_wait": {
                 "mode": "Random",
                 "fixed_wait": 10,
@@ -915,6 +915,7 @@
             "need_proxy": true,
             "proxy_pool": "iproyal",
             "proxy_cd": 5,
+            "session_max_life": 60,
             "sentinel": {
                 "account_source": "built-in",
                 "account_pool_id": "gb.es.sentinel",
@@ -929,7 +930,6 @@
                 "booking_cooldown": 10,
                 "max_bookings_per_account": 1
             },
-            "session_max_life": 60,
             "query_wait": {
                 "mode": "Random",
                 "fixed_wait": 10,
@@ -971,11 +971,12 @@
         {
             "identifier": "tls.gb.fr",
             "debug": false,
-            "enable": false,
+            "enable": true,
             "need_account": true,
             "need_proxy": true,
-            "proxy_pool": "iproyal",
+            "proxy_pool": "isp_all",
             "proxy_cd": 5,
+            "session_max_life": 30,
             "sentinel": {
                 "account_source": "built-in",
                 "account_pool_id": "gb.fr.sentinel",
@@ -990,7 +991,6 @@
                 "booking_cooldown": 10,
                 "max_bookings_per_account": 1
             },
-            "session_max_life": 30,
             "query_wait": {
                 "mode": "Random",
                 "fixed_wait": 10,
@@ -1036,6 +1036,7 @@
             "need_proxy": true,
             "proxy_pool": "iproyal",
             "proxy_cd": 5,
+            "session_max_life": 15,
             "sentinel": {
                 "account_source": "",
                 "account_pool_id": "",
@@ -1051,7 +1052,6 @@
                 "booking_cooldown": 10,
                 "max_bookings_per_account": 1
             },
-            "session_max_life": 15,
             "query_wait": {
                 "mode": "Random",
                 "fixed_wait": 10,
@@ -1085,8 +1085,9 @@
             "enable": false,
             "need_account": true,
             "need_proxy": true,
-            "proxy_pool": "local",
+            "proxy_pool": "isp_all",
             "proxy_cd": 5,
+            "session_max_life": 15,
             "sentinel": {
                 "account_source": "built-in",
                 "account_pool_id": "ie.it.sentinel",
@@ -1101,7 +1102,6 @@
                 "booking_cooldown": 10,
                 "max_bookings_per_account": 1
             },
-            "session_max_life": 15,
             "query_wait": {
                 "mode": "Random",
                 "fixed_wait": 10,
@@ -1131,11 +1131,12 @@
         {
             "identifier": "greekemba.ie.gr",
             "debug": false,
-            "enable": false,
+            "enable": true,
             "need_account": true,
             "need_proxy": true,
             "proxy_pool": "isp_all",
             "proxy_cd": 5,
+            "session_max_life": 120,
             "sentinel": {
                 "account_source": "built-in",
                 "account_pool_id": "ie.gr.sentinel",
@@ -1148,9 +1149,8 @@
                 "target_instances": 1,
                 "account_cd": 180,
                 "booking_cooldown": 10,
-                "max_bookings_per_account": 2
+                "max_bookings_per_account": 1
             },
-            "session_max_life": 15,
             "query_wait": {
                 "mode": "Random",
                 "fixed_wait": 10,

+ 0 - 9
data/account_states.json

@@ -1,9 +0,0 @@
-{
-    "ie_nl::ie_nl_vxzo9t@gmail-app.com": 1769637414.02752,
-    "ie_nl::ie_nl_y118ln@gmail-app.com": 1769637659.231531,
-    "ie_nl::ie_nl_yk3mah@gmail-app.com": 1769637843.617249,
-    "ie_nl::ie_nl_x0rh02@gmail-app.com": 1769637865.6890712,
-    "ie_nl::ie_nl_cluyap@gmail-app.com": 1769637902.6951838,
-    "ie_nl::ie_nl_cx2v7z@gmail-app.com": 1769638247.758345,
-    "ie_nl::ie_nl_quqc36@gmail-app.com": 1769638336.8477702
-}

+ 0 - 3
data/proxy_states.json

@@ -1,3 +0,0 @@
-{
-    "local::100029": 1775414740.931227
-}

+ 22 - 22
docker-compose.yml

@@ -24,25 +24,25 @@ services:
           cpus: '2.0'
           memory: 4G
 
-  visa-booker:
-    build: .
-    image: coordinator:latest
-    container_name: coordinator-booker
-    command: ["python3", "main_booker.py"]
-    restart: unless-stopped
-    shm_size: '2gb'
-    volumes:
-      - ./config:/app/config
-      - ./logs:/app/logs
-      - ./data:/app/data
-      - ./plugins:/app/plugins
-    environment:
-      - TZ=Asia/Shanghai
-      - DISPLAY=:99
-      - CHROME_BIN=/usr/bin/chromium
-    # 资源限制
-    deploy:
-      resources:
-        limits:
-          cpus: '2.0'
-          memory: 4G
+  # visa-booker:
+  #   build: .
+  #   image: coordinator:latest
+  #   container_name: coordinator-booker
+  #   command: ["python3", "main_booker.py"]
+  #   restart: unless-stopped
+  #   shm_size: '2gb'
+  #   volumes:
+  #     - ./config:/app/config
+  #     - ./logs:/app/logs
+  #     - ./data:/app/data
+  #     - ./plugins:/app/plugins
+  #   environment:
+  #     - TZ=Asia/Shanghai
+  #     - DISPLAY=:99
+  #     - CHROME_BIN=/usr/bin/chromium
+  #   # 资源限制
+  #   deploy:
+  #     resources:
+  #       limits:
+  #         cpus: '2.0'
+  #         memory: 4G

+ 2 - 2
plugins/bls_plugin.py

@@ -50,7 +50,7 @@ class BlsPlugin(IVSPlg):
         # --- [核心修改] 并发隔离与资源管理 ---
         # 生成唯一实例 ID
         self.instance_id = uuid.uuid4().hex[:8]
-        self.root_workspace = os.path.abspath(os.path.join("temp_browser_data", f"{self.group_id}_{self.instance_id}"))
+        self.root_workspace = os.path.abspath(os.path.join("data/temp_browser_data", f"{self.group_id}.{self.instance_id}"))
         # 定义子目录:代理插件目录 & 浏览器用户数据目录
         self.user_data_path = os.path.join(self.root_workspace, "user_data")
         
@@ -419,7 +419,7 @@ class BlsPlugin(IVSPlg):
         return proxy_url
     
     def _save_debug_html(self, content: str, prefix: str = "debug"):
-        save_dir = "debug_pages"
+        save_dir = "data/debug_pages"
         if not os.path.exists(save_dir):
             os.makedirs(save_dir)
         timestamp = datetime.now().strftime("%Y%m%d_%H%M%S")

+ 1 - 1
plugins/de_plugin.py

@@ -62,7 +62,7 @@ class DePlugin(IVSPlg):
         
         # 资源隔离
         self.instance_id = uuid.uuid4().hex[:8]
-        self.root_workspace = os.path.abspath(os.path.join("temp_browser_data", f"{self.group_id}_{self.instance_id}"))
+        self.root_workspace = os.path.abspath(os.path.join("data/temp_browser_data", f"{self.group_id}.{self.instance_id}"))
         self.user_data_path = os.path.join(self.root_workspace, "user_data")
         
         if not os.path.exists(self.root_workspace):

+ 1 - 1
plugins/grc_plugin.py

@@ -463,7 +463,7 @@ class GrcPlugin(IVSPlg):
             self.logger(f'[GrcPlugin] [{self.group_id}] {message}')
     
     def _save_debug_html(self, content: str, prefix: str = "debug"):
-        save_dir = "debug_pages"
+        save_dir = "data/debug_pages"
         if not os.path.exists(save_dir):
             os.makedirs(save_dir)
         timestamp = datetime.now().strftime("%Y%m%d_%H%M%S")

+ 1 - 1
plugins/ita_plugin.py

@@ -56,7 +56,7 @@ class ItaPlugin(IVSPlg):
         # --- [核心修改] 并发隔离与资源管理 ---
         # 生成唯一实例 ID
         self.instance_id = uuid.uuid4().hex[:8]
-        self.root_workspace = os.path.abspath(os.path.join("temp_browser_data", f"{self.group_id}_{self.instance_id}"))
+        self.root_workspace = os.path.abspath(os.path.join("data/temp_browser_data", f"{self.group_id}.{self.instance_id}"))
         # 定义子目录:代理插件目录 & 浏览器用户数据目录
         self.user_data_path = os.path.join(self.root_workspace, "user_data")
         

+ 1 - 1
plugins/tls_plugin.py

@@ -58,7 +58,7 @@ class TlsPlugin(IVSPlg):
         # --- [核心修改] 并发隔离与资源管理 ---
         # 生成唯一实例 ID
         self.instance_id = uuid.uuid4().hex[:8]
-        self.root_workspace = os.path.abspath(os.path.join("temp_browser_data", f"{self.group_id}_{self.instance_id}"))
+        self.root_workspace = os.path.abspath(os.path.join("data/temp_browser_data", f"{self.group_id}.{self.instance_id}"))
         # 定义子目录:代理插件目录 & 浏览器用户数据目录
         self.user_data_path = os.path.join(self.root_workspace, "user_data")
     

+ 1 - 1
plugins/vfs_plugin.py

@@ -144,7 +144,7 @@ class VfsPlugin(IVSPlg):
         # --- [核心修改] 并发隔离与资源管理 ---
         # 生成唯一实例 ID
         self.instance_id = uuid.uuid4().hex[:8]
-        self.root_workspace = os.path.abspath(os.path.join("temp_browser_data", f"{self.group_id}_{self.instance_id}"))
+        self.root_workspace = os.path.abspath(os.path.join("data/temp_browser_data", f"{self.group_id}.{self.instance_id}"))
         self.user_data_path = os.path.join(self.root_workspace, "user_data")
         
         # 持有隧道实例

+ 1 - 0
requirements.txt

@@ -1,5 +1,6 @@
 DrissionPage>=4.0.0
 bs4
+redis
 cryptography
 curl-cffi>=0.7.0
 ddddocr==1.4.11

+ 2 - 2
vs_types.py

@@ -85,8 +85,8 @@ class SentinelConfig(BaseModel):
     account_source: str = "built-in"
     account_pool_id: str = ""
     target_instances: int = 1
-    account_cd: int = 180
-    signal_ttl: int = 180 
+    account_cd: int = 180           # 单位 分钟
+    signal_ttl: int = 180           # 单位 秒
 
 # === Booker配置 ===
 class BookerConfig(BaseModel):