9router 0.3.33 → 0.3.35

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (564) hide show
  1. package/app/.next/BUILD_ID +1 -1
  2. package/app/.next/app-path-routes-manifest.json +45 -44
  3. package/app/.next/build-manifest.json +2 -2
  4. package/app/.next/routes-manifest.json +6 -0
  5. package/app/.next/server/app/(dashboard)/dashboard/cli-tools/page.js +1 -1
  6. package/app/.next/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +1 -1
  7. package/app/.next/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
  8. package/app/.next/server/app/(dashboard)/dashboard/combos/page.js +1 -1
  9. package/app/.next/server/app/(dashboard)/dashboard/combos/page.js.nft.json +1 -1
  10. package/app/.next/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
  11. package/app/.next/server/app/(dashboard)/dashboard/console-log/page.js +1 -1
  12. package/app/.next/server/app/(dashboard)/dashboard/console-log/page.js.nft.json +1 -1
  13. package/app/.next/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
  14. package/app/.next/server/app/(dashboard)/dashboard/endpoint/page.js +1 -1
  15. package/app/.next/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +1 -1
  16. package/app/.next/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
  17. package/app/.next/server/app/(dashboard)/dashboard/mitm/page.js +2 -2
  18. package/app/.next/server/app/(dashboard)/dashboard/mitm/page.js.nft.json +1 -1
  19. package/app/.next/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
  20. package/app/.next/server/app/(dashboard)/dashboard/page.js +1 -1
  21. package/app/.next/server/app/(dashboard)/dashboard/page.js.nft.json +1 -1
  22. package/app/.next/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
  23. package/app/.next/server/app/(dashboard)/dashboard/profile/page.js +1 -1
  24. package/app/.next/server/app/(dashboard)/dashboard/profile/page.js.nft.json +1 -1
  25. package/app/.next/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
  26. package/app/.next/server/app/(dashboard)/dashboard/providers/[id]/page.js +1 -1
  27. package/app/.next/server/app/(dashboard)/dashboard/providers/[id]/page.js.nft.json +1 -1
  28. package/app/.next/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
  29. package/app/.next/server/app/(dashboard)/dashboard/providers/new/page.js +1 -1
  30. package/app/.next/server/app/(dashboard)/dashboard/providers/new/page.js.nft.json +1 -1
  31. package/app/.next/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
  32. package/app/.next/server/app/(dashboard)/dashboard/providers/page.js +1 -1
  33. package/app/.next/server/app/(dashboard)/dashboard/providers/page.js.nft.json +1 -1
  34. package/app/.next/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
  35. package/app/.next/server/app/(dashboard)/dashboard/quota/page.js +1 -1
  36. package/app/.next/server/app/(dashboard)/dashboard/quota/page.js.nft.json +1 -1
  37. package/app/.next/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
  38. package/app/.next/server/app/(dashboard)/dashboard/translator/page.js +2 -2
  39. package/app/.next/server/app/(dashboard)/dashboard/translator/page.js.nft.json +1 -1
  40. package/app/.next/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
  41. package/app/.next/server/app/(dashboard)/dashboard/usage/page.js +1 -1
  42. package/app/.next/server/app/(dashboard)/dashboard/usage/page.js.nft.json +1 -1
  43. package/app/.next/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
  44. package/app/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  45. package/app/.next/server/app/_global-error.html +2 -2
  46. package/app/.next/server/app/_global-error.rsc +1 -1
  47. package/app/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  48. package/app/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  49. package/app/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  50. package/app/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  51. package/app/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  52. package/app/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  53. package/app/.next/server/app/_not-found/page.js +1 -1
  54. package/app/.next/server/app/_not-found/page.js.nft.json +1 -1
  55. package/app/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  56. package/app/.next/server/app/_not-found.html +1 -1
  57. package/app/.next/server/app/_not-found.rsc +15 -14
  58. package/app/.next/server/app/_not-found.segments/_full.segment.rsc +15 -14
  59. package/app/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
  60. package/app/.next/server/app/_not-found.segments/_index.segment.rsc +6 -5
  61. package/app/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  62. package/app/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  63. package/app/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  64. package/app/.next/server/app/api/auth/login/route.js +1 -1
  65. package/app/.next/server/app/api/auth/login/route_client-reference-manifest.js +1 -1
  66. package/app/.next/server/app/api/auth/logout/route_client-reference-manifest.js +1 -1
  67. package/app/.next/server/app/api/cli-tools/antigravity-mitm/alias/route_client-reference-manifest.js +1 -1
  68. package/app/.next/server/app/api/cli-tools/antigravity-mitm/route_client-reference-manifest.js +1 -1
  69. package/app/.next/server/app/api/cli-tools/claude-settings/route_client-reference-manifest.js +1 -1
  70. package/app/.next/server/app/api/cli-tools/codex-settings/route_client-reference-manifest.js +1 -1
  71. package/app/.next/server/app/api/cli-tools/copilot-settings/route_client-reference-manifest.js +1 -1
  72. package/app/.next/server/app/api/cli-tools/droid-settings/route_client-reference-manifest.js +1 -1
  73. package/app/.next/server/app/api/cli-tools/openclaw-settings/route_client-reference-manifest.js +1 -1
  74. package/app/.next/server/app/api/cli-tools/opencode-settings/route_client-reference-manifest.js +1 -1
  75. package/app/.next/server/app/api/cloud/auth/route_client-reference-manifest.js +1 -1
  76. package/app/.next/server/app/api/cloud/credentials/update/route_client-reference-manifest.js +1 -1
  77. package/app/.next/server/app/api/cloud/model/resolve/route_client-reference-manifest.js +1 -1
  78. package/app/.next/server/app/api/cloud/models/alias/route_client-reference-manifest.js +1 -1
  79. package/app/.next/server/app/api/combos/[id]/route_client-reference-manifest.js +1 -1
  80. package/app/.next/server/app/api/combos/route.js +1 -1
  81. package/app/.next/server/app/api/combos/route_client-reference-manifest.js +1 -1
  82. package/app/.next/server/app/api/init/route_client-reference-manifest.js +1 -1
  83. package/app/.next/server/app/api/keys/[id]/route_client-reference-manifest.js +1 -1
  84. package/app/.next/server/app/api/keys/route.js +1 -1
  85. package/app/.next/server/app/api/keys/route_client-reference-manifest.js +1 -1
  86. package/app/.next/server/app/api/locale/route.js +1 -0
  87. package/app/.next/server/app/api/locale/route.js.nft.json +1 -0
  88. package/app/.next/server/app/api/locale/route_client-reference-manifest.js +1 -0
  89. package/app/.next/server/app/api/models/alias/route.js +1 -1
  90. package/app/.next/server/app/api/models/alias/route_client-reference-manifest.js +1 -1
  91. package/app/.next/server/app/api/models/route.js +1 -1
  92. package/app/.next/server/app/api/models/route_client-reference-manifest.js +1 -1
  93. package/app/.next/server/app/api/models/test/route_client-reference-manifest.js +1 -1
  94. package/app/.next/server/app/api/oauth/[provider]/[action]/route.js +1 -1
  95. package/app/.next/server/app/api/oauth/[provider]/[action]/route.js.nft.json +1 -1
  96. package/app/.next/server/app/api/oauth/[provider]/[action]/route_client-reference-manifest.js +1 -1
  97. package/app/.next/server/app/api/oauth/cursor/auto-import/route_client-reference-manifest.js +1 -1
  98. package/app/.next/server/app/api/oauth/cursor/import/route_client-reference-manifest.js +1 -1
  99. package/app/.next/server/app/api/oauth/iflow/cookie/route_client-reference-manifest.js +1 -1
  100. package/app/.next/server/app/api/oauth/kiro/auto-import/route_client-reference-manifest.js +1 -1
  101. package/app/.next/server/app/api/oauth/kiro/import/route_client-reference-manifest.js +1 -1
  102. package/app/.next/server/app/api/oauth/kiro/social-authorize/route_client-reference-manifest.js +1 -1
  103. package/app/.next/server/app/api/oauth/kiro/social-exchange/route_client-reference-manifest.js +1 -1
  104. package/app/.next/server/app/api/pricing/route_client-reference-manifest.js +1 -1
  105. package/app/.next/server/app/api/provider-nodes/[id]/route_client-reference-manifest.js +1 -1
  106. package/app/.next/server/app/api/provider-nodes/route.js +1 -1
  107. package/app/.next/server/app/api/provider-nodes/route_client-reference-manifest.js +1 -1
  108. package/app/.next/server/app/api/provider-nodes/validate/route.js +1 -1
  109. package/app/.next/server/app/api/provider-nodes/validate/route_client-reference-manifest.js +1 -1
  110. package/app/.next/server/app/api/providers/[id]/models/route.js +1 -1
  111. package/app/.next/server/app/api/providers/[id]/models/route_client-reference-manifest.js +1 -1
  112. package/app/.next/server/app/api/providers/[id]/route_client-reference-manifest.js +1 -1
  113. package/app/.next/server/app/api/providers/[id]/test/route_client-reference-manifest.js +1 -1
  114. package/app/.next/server/app/api/providers/[id]/test-models/route_client-reference-manifest.js +1 -1
  115. package/app/.next/server/app/api/providers/client/route_client-reference-manifest.js +1 -1
  116. package/app/.next/server/app/api/providers/route.js +1 -1
  117. package/app/.next/server/app/api/providers/route_client-reference-manifest.js +1 -1
  118. package/app/.next/server/app/api/providers/test-batch/route_client-reference-manifest.js +1 -1
  119. package/app/.next/server/app/api/providers/validate/route_client-reference-manifest.js +1 -1
  120. package/app/.next/server/app/api/settings/database/route_client-reference-manifest.js +1 -1
  121. package/app/.next/server/app/api/settings/proxy-test/route_client-reference-manifest.js +1 -1
  122. package/app/.next/server/app/api/settings/require-login/route_client-reference-manifest.js +1 -1
  123. package/app/.next/server/app/api/settings/route.js +1 -1
  124. package/app/.next/server/app/api/settings/route_client-reference-manifest.js +1 -1
  125. package/app/.next/server/app/api/shutdown/route_client-reference-manifest.js +1 -1
  126. package/app/.next/server/app/api/tags/route_client-reference-manifest.js +1 -1
  127. package/app/.next/server/app/api/translator/console-logs/route.js +1 -1
  128. package/app/.next/server/app/api/translator/console-logs/route_client-reference-manifest.js +1 -1
  129. package/app/.next/server/app/api/translator/console-logs/stream/route.js +1 -1
  130. package/app/.next/server/app/api/translator/console-logs/stream/route_client-reference-manifest.js +1 -1
  131. package/app/.next/server/app/api/translator/load/route.js +1 -1
  132. package/app/.next/server/app/api/translator/load/route.js.nft.json +1 -1
  133. package/app/.next/server/app/api/translator/load/route_client-reference-manifest.js +1 -1
  134. package/app/.next/server/app/api/translator/save/route.js +1 -1
  135. package/app/.next/server/app/api/translator/save/route.js.nft.json +1 -1
  136. package/app/.next/server/app/api/translator/save/route_client-reference-manifest.js +1 -1
  137. package/app/.next/server/app/api/translator/send/route.js +1 -1
  138. package/app/.next/server/app/api/translator/send/route.js.nft.json +1 -1
  139. package/app/.next/server/app/api/translator/send/route_client-reference-manifest.js +1 -1
  140. package/app/.next/server/app/api/translator/translate/route.js +1 -1
  141. package/app/.next/server/app/api/translator/translate/route.js.nft.json +1 -1
  142. package/app/.next/server/app/api/translator/translate/route_client-reference-manifest.js +1 -1
  143. package/app/.next/server/app/api/tunnel/disable/route_client-reference-manifest.js +1 -1
  144. package/app/.next/server/app/api/tunnel/enable/route_client-reference-manifest.js +1 -1
  145. package/app/.next/server/app/api/tunnel/status/route_client-reference-manifest.js +1 -1
  146. package/app/.next/server/app/api/usage/[connectionId]/route.js +1 -1
  147. package/app/.next/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
  148. package/app/.next/server/app/api/usage/[connectionId]/route_client-reference-manifest.js +1 -1
  149. package/app/.next/server/app/api/usage/chart/route_client-reference-manifest.js +1 -1
  150. package/app/.next/server/app/api/usage/history/route_client-reference-manifest.js +1 -1
  151. package/app/.next/server/app/api/usage/providers/route_client-reference-manifest.js +1 -1
  152. package/app/.next/server/app/api/usage/request-details/route_client-reference-manifest.js +1 -1
  153. package/app/.next/server/app/api/usage/request-logs/route_client-reference-manifest.js +1 -1
  154. package/app/.next/server/app/api/usage/stats/route_client-reference-manifest.js +1 -1
  155. package/app/.next/server/app/api/usage/stream/route_client-reference-manifest.js +1 -1
  156. package/app/.next/server/app/api/v1/api/chat/route.js +1 -1
  157. package/app/.next/server/app/api/v1/api/chat/route.js.nft.json +1 -1
  158. package/app/.next/server/app/api/v1/api/chat/route_client-reference-manifest.js +1 -1
  159. package/app/.next/server/app/api/v1/chat/completions/route.js +1 -1
  160. package/app/.next/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
  161. package/app/.next/server/app/api/v1/chat/completions/route_client-reference-manifest.js +1 -1
  162. package/app/.next/server/app/api/v1/embeddings/route.js +1 -1
  163. package/app/.next/server/app/api/v1/embeddings/route.js.nft.json +1 -1
  164. package/app/.next/server/app/api/v1/embeddings/route_client-reference-manifest.js +1 -1
  165. package/app/.next/server/app/api/v1/messages/count_tokens/route_client-reference-manifest.js +1 -1
  166. package/app/.next/server/app/api/v1/messages/route.js +1 -1
  167. package/app/.next/server/app/api/v1/messages/route.js.nft.json +1 -1
  168. package/app/.next/server/app/api/v1/messages/route_client-reference-manifest.js +1 -1
  169. package/app/.next/server/app/api/v1/models/route_client-reference-manifest.js +1 -1
  170. package/app/.next/server/app/api/v1/responses/route.js +1 -1
  171. package/app/.next/server/app/api/v1/responses/route.js.nft.json +1 -1
  172. package/app/.next/server/app/api/v1/responses/route_client-reference-manifest.js +1 -1
  173. package/app/.next/server/app/api/v1/route_client-reference-manifest.js +1 -1
  174. package/app/.next/server/app/api/v1beta/models/[...path]/route.js +1 -1
  175. package/app/.next/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
  176. package/app/.next/server/app/api/v1beta/models/[...path]/route_client-reference-manifest.js +1 -1
  177. package/app/.next/server/app/api/v1beta/models/route_client-reference-manifest.js +1 -1
  178. package/app/.next/server/app/api/version/route.js +1 -1
  179. package/app/.next/server/app/api/version/route_client-reference-manifest.js +1 -1
  180. package/app/.next/server/app/callback/page.js +2 -2
  181. package/app/.next/server/app/callback/page.js.nft.json +1 -1
  182. package/app/.next/server/app/callback/page_client-reference-manifest.js +1 -1
  183. package/app/.next/server/app/callback.html +1 -1
  184. package/app/.next/server/app/callback.rsc +19 -18
  185. package/app/.next/server/app/callback.segments/_full.segment.rsc +19 -18
  186. package/app/.next/server/app/callback.segments/_head.segment.rsc +1 -1
  187. package/app/.next/server/app/callback.segments/_index.segment.rsc +6 -5
  188. package/app/.next/server/app/callback.segments/_tree.segment.rsc +2 -2
  189. package/app/.next/server/app/callback.segments/callback/__PAGE__.segment.rsc +1 -1
  190. package/app/.next/server/app/callback.segments/callback.segment.rsc +1 -1
  191. package/app/.next/server/app/dashboard/cli-tools.html +1 -1
  192. package/app/.next/server/app/dashboard/cli-tools.rsc +18 -17
  193. package/app/.next/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +2 -2
  194. package/app/.next/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools.segment.rsc +1 -1
  195. package/app/.next/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  196. package/app/.next/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  197. package/app/.next/server/app/dashboard/cli-tools.segments/_full.segment.rsc +18 -17
  198. package/app/.next/server/app/dashboard/cli-tools.segments/_head.segment.rsc +1 -1
  199. package/app/.next/server/app/dashboard/cli-tools.segments/_index.segment.rsc +6 -5
  200. package/app/.next/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +2 -2
  201. package/app/.next/server/app/dashboard/combos.html +1 -1
  202. package/app/.next/server/app/dashboard/combos.rsc +20 -19
  203. package/app/.next/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +2 -2
  204. package/app/.next/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos.segment.rsc +1 -1
  205. package/app/.next/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  206. package/app/.next/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  207. package/app/.next/server/app/dashboard/combos.segments/_full.segment.rsc +20 -19
  208. package/app/.next/server/app/dashboard/combos.segments/_head.segment.rsc +1 -1
  209. package/app/.next/server/app/dashboard/combos.segments/_index.segment.rsc +6 -5
  210. package/app/.next/server/app/dashboard/combos.segments/_tree.segment.rsc +2 -2
  211. package/app/.next/server/app/dashboard/endpoint.html +1 -1
  212. package/app/.next/server/app/dashboard/endpoint.rsc +18 -17
  213. package/app/.next/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +2 -2
  214. package/app/.next/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint.segment.rsc +1 -1
  215. package/app/.next/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  216. package/app/.next/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  217. package/app/.next/server/app/dashboard/endpoint.segments/_full.segment.rsc +18 -17
  218. package/app/.next/server/app/dashboard/endpoint.segments/_head.segment.rsc +1 -1
  219. package/app/.next/server/app/dashboard/endpoint.segments/_index.segment.rsc +6 -5
  220. package/app/.next/server/app/dashboard/endpoint.segments/_tree.segment.rsc +2 -2
  221. package/app/.next/server/app/dashboard/mitm.html +1 -1
  222. package/app/.next/server/app/dashboard/mitm.rsc +17 -16
  223. package/app/.next/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +2 -2
  224. package/app/.next/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm.segment.rsc +1 -1
  225. package/app/.next/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  226. package/app/.next/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  227. package/app/.next/server/app/dashboard/mitm.segments/_full.segment.rsc +17 -16
  228. package/app/.next/server/app/dashboard/mitm.segments/_head.segment.rsc +1 -1
  229. package/app/.next/server/app/dashboard/mitm.segments/_index.segment.rsc +6 -5
  230. package/app/.next/server/app/dashboard/mitm.segments/_tree.segment.rsc +2 -2
  231. package/app/.next/server/app/dashboard/profile.html +1 -1
  232. package/app/.next/server/app/dashboard/profile.rsc +20 -19
  233. package/app/.next/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +2 -2
  234. package/app/.next/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile.segment.rsc +1 -1
  235. package/app/.next/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  236. package/app/.next/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  237. package/app/.next/server/app/dashboard/profile.segments/_full.segment.rsc +20 -19
  238. package/app/.next/server/app/dashboard/profile.segments/_head.segment.rsc +1 -1
  239. package/app/.next/server/app/dashboard/profile.segments/_index.segment.rsc +6 -5
  240. package/app/.next/server/app/dashboard/profile.segments/_tree.segment.rsc +2 -2
  241. package/app/.next/server/app/dashboard/providers/new.html +1 -1
  242. package/app/.next/server/app/dashboard/providers/new.rsc +20 -19
  243. package/app/.next/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +2 -2
  244. package/app/.next/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new.segment.rsc +1 -1
  245. package/app/.next/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
  246. package/app/.next/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  247. package/app/.next/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  248. package/app/.next/server/app/dashboard/providers/new.segments/_full.segment.rsc +20 -19
  249. package/app/.next/server/app/dashboard/providers/new.segments/_head.segment.rsc +1 -1
  250. package/app/.next/server/app/dashboard/providers/new.segments/_index.segment.rsc +6 -5
  251. package/app/.next/server/app/dashboard/providers/new.segments/_tree.segment.rsc +2 -2
  252. package/app/.next/server/app/dashboard/providers.html +1 -1
  253. package/app/.next/server/app/dashboard/providers.rsc +20 -19
  254. package/app/.next/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +2 -2
  255. package/app/.next/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
  256. package/app/.next/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  257. package/app/.next/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  258. package/app/.next/server/app/dashboard/providers.segments/_full.segment.rsc +20 -19
  259. package/app/.next/server/app/dashboard/providers.segments/_head.segment.rsc +1 -1
  260. package/app/.next/server/app/dashboard/providers.segments/_index.segment.rsc +6 -5
  261. package/app/.next/server/app/dashboard/providers.segments/_tree.segment.rsc +2 -2
  262. package/app/.next/server/app/dashboard/quota.html +2 -2
  263. package/app/.next/server/app/dashboard/quota.rsc +18 -17
  264. package/app/.next/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +1 -1
  265. package/app/.next/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota.segment.rsc +1 -1
  266. package/app/.next/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  267. package/app/.next/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  268. package/app/.next/server/app/dashboard/quota.segments/_full.segment.rsc +18 -17
  269. package/app/.next/server/app/dashboard/quota.segments/_head.segment.rsc +1 -1
  270. package/app/.next/server/app/dashboard/quota.segments/_index.segment.rsc +6 -5
  271. package/app/.next/server/app/dashboard/quota.segments/_tree.segment.rsc +2 -2
  272. package/app/.next/server/app/dashboard/settings/pricing/page.js +1 -1
  273. package/app/.next/server/app/dashboard/settings/pricing/page.js.nft.json +1 -1
  274. package/app/.next/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
  275. package/app/.next/server/app/dashboard/settings/pricing.html +1 -1
  276. package/app/.next/server/app/dashboard/settings/pricing.rsc +19 -18
  277. package/app/.next/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +19 -18
  278. package/app/.next/server/app/dashboard/settings/pricing.segments/_head.segment.rsc +1 -1
  279. package/app/.next/server/app/dashboard/settings/pricing.segments/_index.segment.rsc +6 -5
  280. package/app/.next/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +2 -2
  281. package/app/.next/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +1 -1
  282. package/app/.next/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing.segment.rsc +1 -1
  283. package/app/.next/server/app/dashboard/settings/pricing.segments/dashboard/settings.segment.rsc +1 -1
  284. package/app/.next/server/app/dashboard/settings/pricing.segments/dashboard.segment.rsc +1 -1
  285. package/app/.next/server/app/dashboard/translator.html +1 -1
  286. package/app/.next/server/app/dashboard/translator.rsc +20 -19
  287. package/app/.next/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +2 -2
  288. package/app/.next/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator.segment.rsc +1 -1
  289. package/app/.next/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  290. package/app/.next/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  291. package/app/.next/server/app/dashboard/translator.segments/_full.segment.rsc +20 -19
  292. package/app/.next/server/app/dashboard/translator.segments/_head.segment.rsc +1 -1
  293. package/app/.next/server/app/dashboard/translator.segments/_index.segment.rsc +6 -5
  294. package/app/.next/server/app/dashboard/translator.segments/_tree.segment.rsc +2 -2
  295. package/app/.next/server/app/dashboard/usage.html +1 -1
  296. package/app/.next/server/app/dashboard/usage.rsc +20 -19
  297. package/app/.next/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +2 -2
  298. package/app/.next/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage.segment.rsc +1 -1
  299. package/app/.next/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  300. package/app/.next/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  301. package/app/.next/server/app/dashboard/usage.segments/_full.segment.rsc +20 -19
  302. package/app/.next/server/app/dashboard/usage.segments/_head.segment.rsc +1 -1
  303. package/app/.next/server/app/dashboard/usage.segments/_index.segment.rsc +6 -5
  304. package/app/.next/server/app/dashboard/usage.segments/_tree.segment.rsc +2 -2
  305. package/app/.next/server/app/dashboard.html +1 -1
  306. package/app/.next/server/app/dashboard.rsc +18 -17
  307. package/app/.next/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +2 -2
  308. package/app/.next/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  309. package/app/.next/server/app/dashboard.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  310. package/app/.next/server/app/dashboard.segments/_full.segment.rsc +18 -17
  311. package/app/.next/server/app/dashboard.segments/_head.segment.rsc +1 -1
  312. package/app/.next/server/app/dashboard.segments/_index.segment.rsc +6 -5
  313. package/app/.next/server/app/dashboard.segments/_tree.segment.rsc +2 -2
  314. package/app/.next/server/app/index.html +1 -1
  315. package/app/.next/server/app/index.rsc +16 -15
  316. package/app/.next/server/app/index.segments/__PAGE__.segment.rsc +1 -1
  317. package/app/.next/server/app/index.segments/_full.segment.rsc +16 -15
  318. package/app/.next/server/app/index.segments/_head.segment.rsc +1 -1
  319. package/app/.next/server/app/index.segments/_index.segment.rsc +6 -5
  320. package/app/.next/server/app/index.segments/_tree.segment.rsc +2 -2
  321. package/app/.next/server/app/landing/page.js +1 -1
  322. package/app/.next/server/app/landing/page.js.nft.json +1 -1
  323. package/app/.next/server/app/landing/page_client-reference-manifest.js +1 -1
  324. package/app/.next/server/app/landing.html +1 -1
  325. package/app/.next/server/app/landing.rsc +19 -18
  326. package/app/.next/server/app/landing.segments/_full.segment.rsc +19 -18
  327. package/app/.next/server/app/landing.segments/_head.segment.rsc +1 -1
  328. package/app/.next/server/app/landing.segments/_index.segment.rsc +6 -5
  329. package/app/.next/server/app/landing.segments/_tree.segment.rsc +2 -2
  330. package/app/.next/server/app/landing.segments/landing/__PAGE__.segment.rsc +1 -1
  331. package/app/.next/server/app/landing.segments/landing.segment.rsc +1 -1
  332. package/app/.next/server/app/login/page.js +1 -1
  333. package/app/.next/server/app/login/page.js.nft.json +1 -1
  334. package/app/.next/server/app/login/page_client-reference-manifest.js +1 -1
  335. package/app/.next/server/app/login.html +1 -1
  336. package/app/.next/server/app/login.rsc +19 -18
  337. package/app/.next/server/app/login.segments/_full.segment.rsc +19 -18
  338. package/app/.next/server/app/login.segments/_head.segment.rsc +1 -1
  339. package/app/.next/server/app/login.segments/_index.segment.rsc +6 -5
  340. package/app/.next/server/app/login.segments/_tree.segment.rsc +2 -2
  341. package/app/.next/server/app/login.segments/login/__PAGE__.segment.rsc +2 -2
  342. package/app/.next/server/app/login.segments/login.segment.rsc +1 -1
  343. package/app/.next/server/app/manifest.webmanifest/route.js.nft.json +1 -1
  344. package/app/.next/server/app/manifest.webmanifest/route_client-reference-manifest.js +1 -1
  345. package/app/.next/server/app/page.js +1 -1
  346. package/app/.next/server/app/page.js.nft.json +1 -1
  347. package/app/.next/server/app/page_client-reference-manifest.js +1 -1
  348. package/app/.next/server/app-paths-manifest.json +45 -44
  349. package/app/.next/server/chunks/1114.js +1 -0
  350. package/app/.next/server/chunks/{4822.js → 1220.js} +1 -1
  351. package/app/.next/server/chunks/318.js +162 -0
  352. package/app/.next/server/chunks/412.js +4 -4
  353. package/app/.next/server/chunks/6182.js +15 -17
  354. package/app/.next/server/chunks/649.js +1 -1
  355. package/app/.next/server/chunks/7132.js +1 -0
  356. package/app/.next/server/chunks/7861.js +1 -0
  357. package/app/.next/server/chunks/8590.js +1 -1
  358. package/app/.next/server/chunks/8895.js +1 -1
  359. package/app/.next/server/pages/404.html +1 -1
  360. package/app/.next/server/pages/500.html +2 -2
  361. package/app/.next/server/server-reference-manifest.js +1 -1
  362. package/app/.next/server/server-reference-manifest.json +1 -1
  363. package/app/.next/static/chunks/5497-50140f31fb49aa0a.js +7 -0
  364. package/app/.next/static/chunks/{9242-ebb05a40387b301d.js → 9242-b217d166d0bd8f13.js} +1 -1
  365. package/app/.next/static/chunks/app/(dashboard)/dashboard/mitm/page-088e98717d308134.js +1 -0
  366. package/app/.next/static/chunks/app/(dashboard)/dashboard/providers/page-38f44aef01bdee63.js +1 -0
  367. package/app/.next/static/chunks/app/(dashboard)/dashboard/translator/page-be6d430d1375fbb5.js +1 -0
  368. package/app/.next/static/chunks/app/(dashboard)/layout-305ccb9e5615ce7d.js +1 -0
  369. package/app/.next/static/chunks/app/_global-error/page-bacff678ec57ee01.js +1 -0
  370. package/app/.next/static/chunks/app/api/auth/login/route-bacff678ec57ee01.js +1 -0
  371. package/app/.next/static/chunks/app/api/auth/logout/route-bacff678ec57ee01.js +1 -0
  372. package/app/.next/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-bacff678ec57ee01.js +1 -0
  373. package/app/.next/static/chunks/app/api/cli-tools/antigravity-mitm/route-bacff678ec57ee01.js +1 -0
  374. package/app/.next/static/chunks/app/api/cli-tools/claude-settings/route-bacff678ec57ee01.js +1 -0
  375. package/app/.next/static/chunks/app/api/cli-tools/codex-settings/route-bacff678ec57ee01.js +1 -0
  376. package/app/.next/static/chunks/app/api/cli-tools/copilot-settings/route-bacff678ec57ee01.js +1 -0
  377. package/app/.next/static/chunks/app/api/cli-tools/droid-settings/route-bacff678ec57ee01.js +1 -0
  378. package/app/.next/static/chunks/app/api/cli-tools/openclaw-settings/route-bacff678ec57ee01.js +1 -0
  379. package/app/.next/static/chunks/app/api/cli-tools/opencode-settings/route-bacff678ec57ee01.js +1 -0
  380. package/app/.next/static/chunks/app/api/cloud/auth/route-bacff678ec57ee01.js +1 -0
  381. package/app/.next/static/chunks/app/api/cloud/credentials/update/route-bacff678ec57ee01.js +1 -0
  382. package/app/.next/static/chunks/app/api/cloud/model/resolve/route-bacff678ec57ee01.js +1 -0
  383. package/app/.next/static/chunks/app/api/cloud/models/alias/route-bacff678ec57ee01.js +1 -0
  384. package/app/.next/static/chunks/app/api/combos/[id]/route-bacff678ec57ee01.js +1 -0
  385. package/app/.next/static/chunks/app/api/combos/route-bacff678ec57ee01.js +1 -0
  386. package/app/.next/static/chunks/app/api/init/route-bacff678ec57ee01.js +1 -0
  387. package/app/.next/static/chunks/app/api/keys/[id]/route-bacff678ec57ee01.js +1 -0
  388. package/app/.next/static/chunks/app/api/keys/route-bacff678ec57ee01.js +1 -0
  389. package/app/.next/static/chunks/app/api/locale/route-bacff678ec57ee01.js +1 -0
  390. package/app/.next/static/chunks/app/api/models/alias/route-bacff678ec57ee01.js +1 -0
  391. package/app/.next/static/chunks/app/api/models/route-bacff678ec57ee01.js +1 -0
  392. package/app/.next/static/chunks/app/api/models/test/route-bacff678ec57ee01.js +1 -0
  393. package/app/.next/static/chunks/app/api/oauth/[provider]/[action]/route-bacff678ec57ee01.js +1 -0
  394. package/app/.next/static/chunks/app/api/oauth/cursor/auto-import/route-bacff678ec57ee01.js +1 -0
  395. package/app/.next/static/chunks/app/api/oauth/cursor/import/route-bacff678ec57ee01.js +1 -0
  396. package/app/.next/static/chunks/app/api/oauth/iflow/cookie/route-bacff678ec57ee01.js +1 -0
  397. package/app/.next/static/chunks/app/api/oauth/kiro/auto-import/route-bacff678ec57ee01.js +1 -0
  398. package/app/.next/static/chunks/app/api/oauth/kiro/import/route-bacff678ec57ee01.js +1 -0
  399. package/app/.next/static/chunks/app/api/oauth/kiro/social-authorize/route-bacff678ec57ee01.js +1 -0
  400. package/app/.next/static/chunks/app/api/oauth/kiro/social-exchange/route-bacff678ec57ee01.js +1 -0
  401. package/app/.next/static/chunks/app/api/pricing/route-bacff678ec57ee01.js +1 -0
  402. package/app/.next/static/chunks/app/api/provider-nodes/[id]/route-bacff678ec57ee01.js +1 -0
  403. package/app/.next/static/chunks/app/api/provider-nodes/route-bacff678ec57ee01.js +1 -0
  404. package/app/.next/static/chunks/app/api/provider-nodes/validate/route-bacff678ec57ee01.js +1 -0
  405. package/app/.next/static/chunks/app/api/providers/[id]/models/route-bacff678ec57ee01.js +1 -0
  406. package/app/.next/static/chunks/app/api/providers/[id]/route-bacff678ec57ee01.js +1 -0
  407. package/app/.next/static/chunks/app/api/providers/[id]/test/route-bacff678ec57ee01.js +1 -0
  408. package/app/.next/static/chunks/app/api/providers/[id]/test-models/route-bacff678ec57ee01.js +1 -0
  409. package/app/.next/static/chunks/app/api/providers/client/route-bacff678ec57ee01.js +1 -0
  410. package/app/.next/static/chunks/app/api/providers/route-bacff678ec57ee01.js +1 -0
  411. package/app/.next/static/chunks/app/api/providers/test-batch/route-bacff678ec57ee01.js +1 -0
  412. package/app/.next/static/chunks/app/api/providers/validate/route-bacff678ec57ee01.js +1 -0
  413. package/app/.next/static/chunks/app/api/settings/database/route-bacff678ec57ee01.js +1 -0
  414. package/app/.next/static/chunks/app/api/settings/proxy-test/route-bacff678ec57ee01.js +1 -0
  415. package/app/.next/static/chunks/app/api/settings/require-login/route-bacff678ec57ee01.js +1 -0
  416. package/app/.next/static/chunks/app/api/settings/route-bacff678ec57ee01.js +1 -0
  417. package/app/.next/static/chunks/app/api/shutdown/route-bacff678ec57ee01.js +1 -0
  418. package/app/.next/static/chunks/app/api/tags/route-bacff678ec57ee01.js +1 -0
  419. package/app/.next/static/chunks/app/api/translator/console-logs/route-bacff678ec57ee01.js +1 -0
  420. package/app/.next/static/chunks/app/api/translator/console-logs/stream/route-bacff678ec57ee01.js +1 -0
  421. package/app/.next/static/chunks/app/api/translator/load/route-bacff678ec57ee01.js +1 -0
  422. package/app/.next/static/chunks/app/api/translator/save/route-bacff678ec57ee01.js +1 -0
  423. package/app/.next/static/chunks/app/api/translator/send/route-bacff678ec57ee01.js +1 -0
  424. package/app/.next/static/chunks/app/api/translator/translate/route-bacff678ec57ee01.js +1 -0
  425. package/app/.next/static/chunks/app/api/tunnel/disable/route-bacff678ec57ee01.js +1 -0
  426. package/app/.next/static/chunks/app/api/tunnel/enable/route-bacff678ec57ee01.js +1 -0
  427. package/app/.next/static/chunks/app/api/tunnel/status/route-bacff678ec57ee01.js +1 -0
  428. package/app/.next/static/chunks/app/api/usage/[connectionId]/route-bacff678ec57ee01.js +1 -0
  429. package/app/.next/static/chunks/app/api/usage/chart/route-bacff678ec57ee01.js +1 -0
  430. package/app/.next/static/chunks/app/api/usage/history/route-bacff678ec57ee01.js +1 -0
  431. package/app/.next/static/chunks/app/api/usage/providers/route-bacff678ec57ee01.js +1 -0
  432. package/app/.next/static/chunks/app/api/usage/request-details/route-bacff678ec57ee01.js +1 -0
  433. package/app/.next/static/chunks/app/api/usage/request-logs/route-bacff678ec57ee01.js +1 -0
  434. package/app/.next/static/chunks/app/api/usage/stats/route-bacff678ec57ee01.js +1 -0
  435. package/app/.next/static/chunks/app/api/usage/stream/route-bacff678ec57ee01.js +1 -0
  436. package/app/.next/static/chunks/app/api/v1/api/chat/route-bacff678ec57ee01.js +1 -0
  437. package/app/.next/static/chunks/app/api/v1/chat/completions/route-bacff678ec57ee01.js +1 -0
  438. package/app/.next/static/chunks/app/api/v1/embeddings/route-bacff678ec57ee01.js +1 -0
  439. package/app/.next/static/chunks/app/api/v1/messages/count_tokens/route-bacff678ec57ee01.js +1 -0
  440. package/app/.next/static/chunks/app/api/v1/messages/route-bacff678ec57ee01.js +1 -0
  441. package/app/.next/static/chunks/app/api/v1/models/route-bacff678ec57ee01.js +1 -0
  442. package/app/.next/static/chunks/app/api/v1/responses/route-bacff678ec57ee01.js +1 -0
  443. package/app/.next/static/chunks/app/api/v1/route-bacff678ec57ee01.js +1 -0
  444. package/app/.next/static/chunks/app/api/v1beta/models/[...path]/route-bacff678ec57ee01.js +1 -0
  445. package/app/.next/static/chunks/app/api/v1beta/models/route-bacff678ec57ee01.js +1 -0
  446. package/app/.next/static/chunks/app/api/version/route-bacff678ec57ee01.js +1 -0
  447. package/app/.next/static/chunks/app/layout-cfb3c2ddc92fc9ce.js +1 -0
  448. package/app/.next/static/chunks/app/manifest.webmanifest/route-bacff678ec57ee01.js +1 -0
  449. package/app/.next/static/chunks/app/page-bacff678ec57ee01.js +1 -0
  450. package/app/.next/static/chunks/next/dist/client/components/builtin/app-error-bacff678ec57ee01.js +1 -0
  451. package/app/.next/static/chunks/next/dist/client/components/builtin/forbidden-bacff678ec57ee01.js +1 -0
  452. package/app/.next/static/chunks/next/dist/client/components/builtin/not-found-bacff678ec57ee01.js +1 -0
  453. package/app/.next/static/chunks/next/dist/client/components/builtin/unauthorized-bacff678ec57ee01.js +1 -0
  454. package/app/.next/static/css/e0bde17827867456.css +3 -0
  455. package/app/.next/static/oViZf10bgRaRGczvIrkpl/_buildManifest.js +1 -0
  456. package/app/package.json +2 -1
  457. package/app/public/i18n/literals/vi.json +196 -0
  458. package/app/public/i18n/literals/zh-CN.json +515 -0
  459. package/app/public/providers/chutes.png +0 -0
  460. package/app/public/providers/kilocode.png +0 -0
  461. package/app/public/providers/siliconflow.png +0 -0
  462. package/app/src/mitm/dns/dnsConfig.js +99 -26
  463. package/app/src/mitm/manager.js +31 -84
  464. package/cli.js +23 -20
  465. package/package.json +1 -1
  466. package/src/cli/tray/autostart.js +56 -35
  467. package/app/.next/server/chunks/1238.js +0 -151
  468. package/app/.next/server/chunks/2280.js +0 -1
  469. package/app/.next/server/chunks/3919.js +0 -1
  470. package/app/.next/server/chunks/4841.js +0 -12
  471. package/app/.next/server/chunks/6384.js +0 -1
  472. package/app/.next/server/chunks/7647.js +0 -1
  473. package/app/.next/static/Ugq2DfuVYz9snZ10EsrCI/_buildManifest.js +0 -1
  474. package/app/.next/static/chunks/5497-4bda86672309b266.js +0 -7
  475. package/app/.next/static/chunks/app/(dashboard)/dashboard/mitm/page-d81fceb6f0154d11.js +0 -1
  476. package/app/.next/static/chunks/app/(dashboard)/dashboard/providers/page-a304dab86115ff4c.js +0 -1
  477. package/app/.next/static/chunks/app/(dashboard)/dashboard/translator/page-8b678c522493c335.js +0 -1
  478. package/app/.next/static/chunks/app/(dashboard)/layout-e85ef8386b3bd547.js +0 -1
  479. package/app/.next/static/chunks/app/_global-error/page-3afc9e982dbedc92.js +0 -1
  480. package/app/.next/static/chunks/app/api/auth/login/route-3afc9e982dbedc92.js +0 -1
  481. package/app/.next/static/chunks/app/api/auth/logout/route-3afc9e982dbedc92.js +0 -1
  482. package/app/.next/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-3afc9e982dbedc92.js +0 -1
  483. package/app/.next/static/chunks/app/api/cli-tools/antigravity-mitm/route-3afc9e982dbedc92.js +0 -1
  484. package/app/.next/static/chunks/app/api/cli-tools/claude-settings/route-3afc9e982dbedc92.js +0 -1
  485. package/app/.next/static/chunks/app/api/cli-tools/codex-settings/route-3afc9e982dbedc92.js +0 -1
  486. package/app/.next/static/chunks/app/api/cli-tools/copilot-settings/route-3afc9e982dbedc92.js +0 -1
  487. package/app/.next/static/chunks/app/api/cli-tools/droid-settings/route-3afc9e982dbedc92.js +0 -1
  488. package/app/.next/static/chunks/app/api/cli-tools/openclaw-settings/route-3afc9e982dbedc92.js +0 -1
  489. package/app/.next/static/chunks/app/api/cli-tools/opencode-settings/route-3afc9e982dbedc92.js +0 -1
  490. package/app/.next/static/chunks/app/api/cloud/auth/route-3afc9e982dbedc92.js +0 -1
  491. package/app/.next/static/chunks/app/api/cloud/credentials/update/route-3afc9e982dbedc92.js +0 -1
  492. package/app/.next/static/chunks/app/api/cloud/model/resolve/route-3afc9e982dbedc92.js +0 -1
  493. package/app/.next/static/chunks/app/api/cloud/models/alias/route-3afc9e982dbedc92.js +0 -1
  494. package/app/.next/static/chunks/app/api/combos/[id]/route-3afc9e982dbedc92.js +0 -1
  495. package/app/.next/static/chunks/app/api/combos/route-3afc9e982dbedc92.js +0 -1
  496. package/app/.next/static/chunks/app/api/init/route-3afc9e982dbedc92.js +0 -1
  497. package/app/.next/static/chunks/app/api/keys/[id]/route-3afc9e982dbedc92.js +0 -1
  498. package/app/.next/static/chunks/app/api/keys/route-3afc9e982dbedc92.js +0 -1
  499. package/app/.next/static/chunks/app/api/models/alias/route-3afc9e982dbedc92.js +0 -1
  500. package/app/.next/static/chunks/app/api/models/route-3afc9e982dbedc92.js +0 -1
  501. package/app/.next/static/chunks/app/api/models/test/route-3afc9e982dbedc92.js +0 -1
  502. package/app/.next/static/chunks/app/api/oauth/[provider]/[action]/route-3afc9e982dbedc92.js +0 -1
  503. package/app/.next/static/chunks/app/api/oauth/cursor/auto-import/route-3afc9e982dbedc92.js +0 -1
  504. package/app/.next/static/chunks/app/api/oauth/cursor/import/route-3afc9e982dbedc92.js +0 -1
  505. package/app/.next/static/chunks/app/api/oauth/iflow/cookie/route-3afc9e982dbedc92.js +0 -1
  506. package/app/.next/static/chunks/app/api/oauth/kiro/auto-import/route-3afc9e982dbedc92.js +0 -1
  507. package/app/.next/static/chunks/app/api/oauth/kiro/import/route-3afc9e982dbedc92.js +0 -1
  508. package/app/.next/static/chunks/app/api/oauth/kiro/social-authorize/route-3afc9e982dbedc92.js +0 -1
  509. package/app/.next/static/chunks/app/api/oauth/kiro/social-exchange/route-3afc9e982dbedc92.js +0 -1
  510. package/app/.next/static/chunks/app/api/pricing/route-3afc9e982dbedc92.js +0 -1
  511. package/app/.next/static/chunks/app/api/provider-nodes/[id]/route-3afc9e982dbedc92.js +0 -1
  512. package/app/.next/static/chunks/app/api/provider-nodes/route-3afc9e982dbedc92.js +0 -1
  513. package/app/.next/static/chunks/app/api/provider-nodes/validate/route-3afc9e982dbedc92.js +0 -1
  514. package/app/.next/static/chunks/app/api/providers/[id]/models/route-3afc9e982dbedc92.js +0 -1
  515. package/app/.next/static/chunks/app/api/providers/[id]/route-3afc9e982dbedc92.js +0 -1
  516. package/app/.next/static/chunks/app/api/providers/[id]/test/route-3afc9e982dbedc92.js +0 -1
  517. package/app/.next/static/chunks/app/api/providers/[id]/test-models/route-3afc9e982dbedc92.js +0 -1
  518. package/app/.next/static/chunks/app/api/providers/client/route-3afc9e982dbedc92.js +0 -1
  519. package/app/.next/static/chunks/app/api/providers/route-3afc9e982dbedc92.js +0 -1
  520. package/app/.next/static/chunks/app/api/providers/test-batch/route-3afc9e982dbedc92.js +0 -1
  521. package/app/.next/static/chunks/app/api/providers/validate/route-3afc9e982dbedc92.js +0 -1
  522. package/app/.next/static/chunks/app/api/settings/database/route-3afc9e982dbedc92.js +0 -1
  523. package/app/.next/static/chunks/app/api/settings/proxy-test/route-3afc9e982dbedc92.js +0 -1
  524. package/app/.next/static/chunks/app/api/settings/require-login/route-3afc9e982dbedc92.js +0 -1
  525. package/app/.next/static/chunks/app/api/settings/route-3afc9e982dbedc92.js +0 -1
  526. package/app/.next/static/chunks/app/api/shutdown/route-3afc9e982dbedc92.js +0 -1
  527. package/app/.next/static/chunks/app/api/tags/route-3afc9e982dbedc92.js +0 -1
  528. package/app/.next/static/chunks/app/api/translator/console-logs/route-3afc9e982dbedc92.js +0 -1
  529. package/app/.next/static/chunks/app/api/translator/console-logs/stream/route-3afc9e982dbedc92.js +0 -1
  530. package/app/.next/static/chunks/app/api/translator/load/route-3afc9e982dbedc92.js +0 -1
  531. package/app/.next/static/chunks/app/api/translator/save/route-3afc9e982dbedc92.js +0 -1
  532. package/app/.next/static/chunks/app/api/translator/send/route-3afc9e982dbedc92.js +0 -1
  533. package/app/.next/static/chunks/app/api/translator/translate/route-3afc9e982dbedc92.js +0 -1
  534. package/app/.next/static/chunks/app/api/tunnel/disable/route-3afc9e982dbedc92.js +0 -1
  535. package/app/.next/static/chunks/app/api/tunnel/enable/route-3afc9e982dbedc92.js +0 -1
  536. package/app/.next/static/chunks/app/api/tunnel/status/route-3afc9e982dbedc92.js +0 -1
  537. package/app/.next/static/chunks/app/api/usage/[connectionId]/route-3afc9e982dbedc92.js +0 -1
  538. package/app/.next/static/chunks/app/api/usage/chart/route-3afc9e982dbedc92.js +0 -1
  539. package/app/.next/static/chunks/app/api/usage/history/route-3afc9e982dbedc92.js +0 -1
  540. package/app/.next/static/chunks/app/api/usage/providers/route-3afc9e982dbedc92.js +0 -1
  541. package/app/.next/static/chunks/app/api/usage/request-details/route-3afc9e982dbedc92.js +0 -1
  542. package/app/.next/static/chunks/app/api/usage/request-logs/route-3afc9e982dbedc92.js +0 -1
  543. package/app/.next/static/chunks/app/api/usage/stats/route-3afc9e982dbedc92.js +0 -1
  544. package/app/.next/static/chunks/app/api/usage/stream/route-3afc9e982dbedc92.js +0 -1
  545. package/app/.next/static/chunks/app/api/v1/api/chat/route-3afc9e982dbedc92.js +0 -1
  546. package/app/.next/static/chunks/app/api/v1/chat/completions/route-3afc9e982dbedc92.js +0 -1
  547. package/app/.next/static/chunks/app/api/v1/embeddings/route-3afc9e982dbedc92.js +0 -1
  548. package/app/.next/static/chunks/app/api/v1/messages/count_tokens/route-3afc9e982dbedc92.js +0 -1
  549. package/app/.next/static/chunks/app/api/v1/messages/route-3afc9e982dbedc92.js +0 -1
  550. package/app/.next/static/chunks/app/api/v1/models/route-3afc9e982dbedc92.js +0 -1
  551. package/app/.next/static/chunks/app/api/v1/responses/route-3afc9e982dbedc92.js +0 -1
  552. package/app/.next/static/chunks/app/api/v1/route-3afc9e982dbedc92.js +0 -1
  553. package/app/.next/static/chunks/app/api/v1beta/models/[...path]/route-3afc9e982dbedc92.js +0 -1
  554. package/app/.next/static/chunks/app/api/v1beta/models/route-3afc9e982dbedc92.js +0 -1
  555. package/app/.next/static/chunks/app/api/version/route-3afc9e982dbedc92.js +0 -1
  556. package/app/.next/static/chunks/app/layout-2e53efc0349b19c9.js +0 -1
  557. package/app/.next/static/chunks/app/manifest.webmanifest/route-3afc9e982dbedc92.js +0 -1
  558. package/app/.next/static/chunks/app/page-3afc9e982dbedc92.js +0 -1
  559. package/app/.next/static/chunks/next/dist/client/components/builtin/app-error-3afc9e982dbedc92.js +0 -1
  560. package/app/.next/static/chunks/next/dist/client/components/builtin/forbidden-3afc9e982dbedc92.js +0 -1
  561. package/app/.next/static/chunks/next/dist/client/components/builtin/not-found-3afc9e982dbedc92.js +0 -1
  562. package/app/.next/static/chunks/next/dist/client/components/builtin/unauthorized-3afc9e982dbedc92.js +0 -1
  563. package/app/.next/static/css/d3d9432d809fcee0.css +0 -3
  564. /package/app/.next/static/{Ugq2DfuVYz9snZ10EsrCI → oViZf10bgRaRGczvIrkpl}/_ssgManifest.js +0 -0
@@ -15,6 +15,47 @@ const HOSTS_FILE = IS_WIN
15
15
  ? path.join(process.env.SystemRoot || "C:\\Windows", "System32", "drivers", "etc", "hosts")
16
16
  : "/etc/hosts";
17
17
 
18
+ /**
19
+ * Execute elevated PowerShell script on Windows via Start-Process -Verb RunAs.
20
+ * Only UAC consent dialog appears, no CMD/PS window popup.
21
+ */
22
+ function executeElevatedPowerShell(psScriptPath, timeoutMs = 30000) {
23
+ const flagFile = path.join(os.tmpdir(), `ps_done_${Date.now()}.flag`);
24
+ const psSQ = (s) => s.replace(/'/g, "''");
25
+
26
+ let psContent = fs.readFileSync(psScriptPath, "utf8");
27
+ psContent += `\nSet-Content -Path '${psSQ(flagFile)}' -Value 'done' -Encoding UTF8\n`;
28
+ fs.writeFileSync(psScriptPath, psContent, "utf8");
29
+
30
+ const outerCmd = `Start-Process powershell -ArgumentList '-NoProfile','-ExecutionPolicy','Bypass','-WindowStyle','Hidden','-File','${psSQ(psScriptPath)}' -Verb RunAs -WindowStyle Hidden`;
31
+
32
+ return new Promise((resolve, reject) => {
33
+ let settled = false;
34
+ const settle = (fn, arg) => { if (!settled) { settled = true; fn(arg); } };
35
+
36
+ exec(
37
+ `powershell -NoProfile -NonInteractive -WindowStyle Hidden -Command "${outerCmd}"`,
38
+ { windowsHide: true },
39
+ () => {}
40
+ );
41
+
42
+ const deadline = Date.now() + timeoutMs;
43
+ const poll = () => {
44
+ if (settled) return;
45
+ if (fs.existsSync(flagFile)) {
46
+ try { fs.unlinkSync(flagFile); fs.unlinkSync(psScriptPath); } catch { /* ignore */ }
47
+ return settle(resolve);
48
+ }
49
+ if (Date.now() > deadline) {
50
+ try { fs.unlinkSync(psScriptPath); } catch { /* ignore */ }
51
+ return settle(reject, new Error("Timed out waiting for UAC confirmation"));
52
+ }
53
+ setTimeout(poll, 500);
54
+ };
55
+ setTimeout(poll, 300);
56
+ });
57
+ }
58
+
18
59
  /**
19
60
  * Execute command with sudo password via stdin (macOS/Linux only)
20
61
  */
@@ -99,18 +140,37 @@ async function addDNSEntry(tool, sudoPassword) {
99
140
  try {
100
141
  if (IS_WIN) {
101
142
  const hostsPath = HOSTS_FILE.replace(/'/g, "''");
102
- const addLines = entriesToAdd.map(h =>
103
- `$hc = Get-Content -Path '${hostsPath}' -Raw -ErrorAction SilentlyContinue; if ($hc -notmatch '${h}') { Add-Content -Path '${hostsPath}' -Value '127.0.0.1 ${h}' -Encoding UTF8 }`
104
- ).join("; ");
105
- const psScript = `${addLines}; ipconfig /flushdns | Out-Null`;
106
- await new Promise((resolve, reject) => {
107
- const escaped = psScript.replace(/"/g, '\\"');
108
- exec(
109
- `powershell -NonInteractive -WindowStyle Hidden -Command "Start-Process powershell -ArgumentList '-NonInteractive -WindowStyle Hidden -Command \\"${escaped}\\"' -Verb RunAs -Wait"`,
110
- { windowsHide: true },
111
- (error) => { if (error) reject(new Error(`Failed to add DNS: ${error.message}`)); else resolve(); }
112
- );
113
- });
143
+
144
+ // Build PowerShell script with proper error handling
145
+ const scriptLines = [];
146
+ scriptLines.push(`$ErrorActionPreference = 'Stop'`);
147
+ scriptLines.push(`$hostsPath = '${hostsPath}'`);
148
+ scriptLines.push(`try {`);
149
+ scriptLines.push(` $hostsContent = Get-Content -Path $hostsPath -Raw -ErrorAction SilentlyContinue`);
150
+ scriptLines.push(` if (-not $hostsContent) { $hostsContent = '' }`);
151
+
152
+ for (const host of entriesToAdd) {
153
+ // Escape special regex chars in hostname
154
+ const escapedHost = host.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
155
+ scriptLines.push(` if ($hostsContent -notmatch '${escapedHost}') {`);
156
+ scriptLines.push(` Add-Content -Path $hostsPath -Value '127.0.0.1 ${host}' -Encoding UTF8 -ErrorAction Stop`);
157
+ scriptLines.push(` Write-Host "Added DNS entry: ${host}"`);
158
+ scriptLines.push(` } else {`);
159
+ scriptLines.push(` Write-Host "DNS entry already exists: ${host}"`);
160
+ scriptLines.push(` }`);
161
+ }
162
+
163
+ scriptLines.push(` ipconfig /flushdns | Out-Null`);
164
+ scriptLines.push(`} catch {`);
165
+ scriptLines.push(` Write-Error "Failed to add DNS: $_"`);
166
+ scriptLines.push(` exit 1`);
167
+ scriptLines.push(`}`);
168
+
169
+ const psScript = scriptLines.join("\n");
170
+ const tmpPs1 = path.join(os.tmpdir(), `mitm_dns_add_${Date.now()}.ps1`);
171
+ fs.writeFileSync(tmpPs1, psScript, "utf8");
172
+
173
+ await executeElevatedPowerShell(tmpPs1, 30000);
114
174
  } else {
115
175
  await execWithPassword(`echo "${entries}" >> ${HOSTS_FILE}`, sudoPassword);
116
176
  await flushDNS(sudoPassword);
@@ -139,23 +199,35 @@ async function removeDNSEntry(tool, sudoPassword) {
139
199
  if (IS_WIN) {
140
200
  const content = fs.readFileSync(HOSTS_FILE, "utf8");
141
201
  const filtered = content.split(/\r?\n/).filter(l => !entriesToRemove.some(h => l.includes(h))).join("\r\n");
142
- const tmpFile = path.join(os.tmpdir(), "hosts_filtered.tmp");
202
+ const tmpFile = path.join(os.tmpdir(), `hosts_filtered_${Date.now()}.tmp`);
143
203
  fs.writeFileSync(tmpFile, filtered, "utf8");
204
+
144
205
  const tmpEsc = tmpFile.replace(/'/g, "''");
145
206
  const hostsEsc = HOSTS_FILE.replace(/'/g, "''");
146
- const psScript = `Copy-Item -Path '${tmpEsc}' -Destination '${hostsEsc}' -Force; ipconfig /flushdns | Out-Null; Remove-Item '${tmpEsc}' -ErrorAction SilentlyContinue`;
147
- await new Promise((resolve, reject) => {
148
- const escaped = psScript.replace(/"/g, '\\"');
149
- exec(
150
- `powershell -NonInteractive -WindowStyle Hidden -Command "Start-Process powershell -ArgumentList '-NonInteractive -WindowStyle Hidden -Command \\"${escaped}\\"' -Verb RunAs -Wait"`,
151
- { windowsHide: true },
152
- (error) => {
153
- try { fs.unlinkSync(tmpFile); } catch { /* ignore */ }
154
- if (error) reject(new Error(`Failed to remove DNS: ${error.message}`));
155
- else resolve();
156
- }
157
- );
158
- });
207
+
208
+ // Build PowerShell script with proper error handling
209
+ const scriptLines = [];
210
+ scriptLines.push(`$ErrorActionPreference = 'Stop'`);
211
+ scriptLines.push(`try {`);
212
+ scriptLines.push(` Copy-Item -Path '${tmpEsc}' -Destination '${hostsEsc}' -Force -ErrorAction Stop`);
213
+ scriptLines.push(` Write-Host "Hosts file updated successfully"`);
214
+ scriptLines.push(` ipconfig /flushdns | Out-Null`);
215
+ scriptLines.push(` Write-Host "DNS cache flushed"`);
216
+ scriptLines.push(` Remove-Item '${tmpEsc}' -ErrorAction SilentlyContinue`);
217
+ scriptLines.push(`} catch {`);
218
+ scriptLines.push(` Write-Error "Failed to remove DNS: $_"`);
219
+ scriptLines.push(` Remove-Item '${tmpEsc}' -ErrorAction SilentlyContinue`);
220
+ scriptLines.push(` exit 1`);
221
+ scriptLines.push(`}`);
222
+
223
+ const psScript = scriptLines.join("\n");
224
+ const tmpPs1 = path.join(os.tmpdir(), `mitm_dns_remove_${Date.now()}.ps1`);
225
+ fs.writeFileSync(tmpPs1, psScript, "utf8");
226
+
227
+ await executeElevatedPowerShell(tmpPs1, 30000);
228
+
229
+ // Cleanup temp file if still exists
230
+ try { fs.unlinkSync(tmpFile); } catch { /* ignore */ }
159
231
  } else {
160
232
  for (const host of entriesToRemove) {
161
233
  const sedCmd = IS_MAC
@@ -191,6 +263,7 @@ module.exports = {
191
263
  removeDNSEntry,
192
264
  removeAllDNSEntries,
193
265
  execWithPassword,
266
+ executeElevatedPowerShell,
194
267
  checkDNSEntry,
195
268
  checkAllDNSStatus,
196
269
  };
@@ -5,7 +5,7 @@ const os = require("os");
5
5
  const net = require("net");
6
6
  const https = require("https");
7
7
  const crypto = require("crypto");
8
- const { addDNSEntry, removeDNSEntry, removeAllDNSEntries, checkAllDNSStatus } = require("./dns/dnsConfig");
8
+ const { addDNSEntry, removeDNSEntry, removeAllDNSEntries, checkAllDNSStatus, executeElevatedPowerShell, TOOL_HOSTS } = require("./dns/dnsConfig");
9
9
 
10
10
  const IS_WIN = process.platform === "win32";
11
11
  const { generateCert } = require("./cert/generate");
@@ -345,49 +345,23 @@ async function startServer(apiKey, sudoPassword) {
345
345
 
346
346
  // Step 2: Spawn server (Root CA already installed in Step 1.5)
347
347
  if (IS_WIN) {
348
- const hostsFile = path.join(process.env.SystemRoot || "C:\\Windows", "System32", "drivers", "etc", "hosts");
349
- const flagFile = path.join(os.tmpdir(), `mitm_ready_${Date.now()}.flag`);
350
348
  const psSQ = (s) => s.replace(/'/g, "''");
351
349
  const nodePs = psSQ(process.execPath);
352
350
  const serverPs = psSQ(SERVER_PATH);
353
- const flagPs = psSQ(flagFile);
354
351
 
355
352
  const psScript = [
353
+ `$ErrorActionPreference = 'Stop'`,
356
354
  `$conn = Get-NetTCPConnection -LocalPort 443 -State Listen -ErrorAction SilentlyContinue | Select-Object -First 1`,
357
355
  `if ($conn -and $conn.OwningProcess -gt 4) { Stop-Process -Id $conn.OwningProcess -Force -ErrorAction SilentlyContinue }`,
358
356
  `Start-Sleep -Milliseconds 500`,
359
357
  `$nodeCmd = 'set ROUTER_API_KEY=${psSQ(apiKey)}&& set NODE_ENV=production&& "${nodePs}" "${serverPs}"'`,
360
358
  `Start-Process cmd -ArgumentList '/c',$nodeCmd -WindowStyle Hidden`,
361
359
  `Start-Sleep -Milliseconds 500`,
362
- `Set-Content -Path '${flagPs}' -Value 'ready' -Encoding UTF8`,
363
360
  ].join("\n");
364
361
 
365
362
  const tmpPs1 = path.join(os.tmpdir(), `mitm_start_${Date.now()}.ps1`);
366
363
  fs.writeFileSync(tmpPs1, psScript, "utf8");
367
- const vbs = [
368
- `Set oShell = CreateObject("Shell.Application")`,
369
- `Dim ps`,
370
- `ps = Chr(34) & "powershell.exe" & Chr(34)`,
371
- `Dim args`,
372
- `args = "-NoProfile -ExecutionPolicy Bypass -File " & Chr(34) & "${tmpPs1}" & Chr(34)`,
373
- `oShell.ShellExecute ps, args, "", "runas", 1`,
374
- ].join("\r\n");
375
- const tmpVbs = path.join(os.tmpdir(), `mitm_uac_${Date.now()}.vbs`);
376
- fs.writeFileSync(tmpVbs, vbs, "utf8");
377
- spawn("wscript.exe", [tmpVbs], { stdio: "ignore", windowsHide: false, detached: true }).unref();
378
-
379
- await new Promise((resolve, reject) => {
380
- const deadline = Date.now() + 90000;
381
- const poll = () => {
382
- if (fs.existsSync(flagFile)) {
383
- try { fs.unlinkSync(flagFile); fs.unlinkSync(tmpPs1); fs.unlinkSync(tmpVbs); } catch { /* ignore */ }
384
- return resolve();
385
- }
386
- if (Date.now() > deadline) return reject(new Error("Timed out waiting for UAC confirmation."));
387
- setTimeout(poll, 500);
388
- };
389
- poll();
390
- });
364
+ await executeElevatedPowerShell(tmpPs1, 90000);
391
365
 
392
366
  if (_updateSettings) await _updateSettings({ mitmCertInstalled: true }).catch(() => { });
393
367
  } else {
@@ -451,38 +425,27 @@ async function startServer(apiKey, sudoPassword) {
451
425
  * Stop MITM server — removes ALL tool DNS entries first, then kills server
452
426
  */
453
427
  async function stopServer(sudoPassword) {
454
- // Remove all DNS entries first (before killing server)
455
- console.log("[MITM] Removing all DNS entries before stopping server...");
456
- await removeAllDNSEntries(sudoPassword);
428
+ console.log("[MITM] Stopping server...");
457
429
 
430
+ // Kill server process
458
431
  const proc = serverProcess;
459
- if (proc && !proc.killed) {
460
- console.log("Stopping MITM server...");
461
- killProcess(proc.pid, false, sudoPassword);
462
- await new Promise(resolve => setTimeout(resolve, 1000));
463
- if (isProcessAlive(proc.pid)) killProcess(proc.pid, true, sudoPassword);
464
- serverProcess = null;
465
- serverPid = null;
466
- } else {
467
- try {
468
- if (fs.existsSync(PID_FILE)) {
469
- const savedPid = parseInt(fs.readFileSync(PID_FILE, "utf-8").trim(), 10);
470
- if (savedPid && isProcessAlive(savedPid)) {
471
- console.log(`Killing MITM server (PID: ${savedPid})...`);
472
- killProcess(savedPid, false, sudoPassword);
473
- await new Promise(resolve => setTimeout(resolve, 1000));
474
- if (isProcessAlive(savedPid)) killProcess(savedPid, true, sudoPassword);
475
- }
476
- }
477
- } catch { /* ignore */ }
478
- serverProcess = null;
479
- serverPid = null;
432
+ const pidToKill = proc && !proc.killed
433
+ ? proc.pid
434
+ : (() => { try { return parseInt(fs.readFileSync(PID_FILE, "utf-8").trim(), 10); } catch { return null; } })();
435
+
436
+ if (pidToKill && isProcessAlive(pidToKill)) {
437
+ console.log(`Killing MITM server (PID: ${pidToKill})...`);
438
+ killProcess(pidToKill, false, sudoPassword);
439
+ await new Promise(r => setTimeout(r, 1000));
440
+ if (isProcessAlive(pidToKill)) killProcess(pidToKill, true, sudoPassword);
480
441
  }
442
+ serverProcess = null;
443
+ serverPid = null;
481
444
 
482
445
  if (IS_WIN) {
446
+ // Single elevated script: clean DNS + flush — 1 UAC prompt only
483
447
  const hostsFile = path.join(process.env.SystemRoot || "C:\\Windows", "System32", "drivers", "etc", "hosts");
484
448
  const psSQ = (s) => s.replace(/'/g, "''");
485
- const { TOOL_HOSTS } = require("./dns/dnsConfig");
486
449
  const allHosts = Object.values(TOOL_HOSTS).flat();
487
450
 
488
451
  let hostsContent = "";
@@ -490,41 +453,25 @@ async function stopServer(sudoPassword) {
490
453
  const filtered = hostsContent.split(/\r?\n/)
491
454
  .filter(l => !allHosts.some(h => l.includes(h)))
492
455
  .join("\r\n");
493
- const tmpHosts = path.join(os.tmpdir(), "mitm_hosts_clean.tmp");
456
+ const tmpHosts = path.join(os.tmpdir(), `mitm_hosts_clean_${Date.now()}.tmp`);
494
457
  fs.writeFileSync(tmpHosts, filtered, "utf8");
495
458
 
496
- const flagFile = path.join(os.tmpdir(), "mitm_stop_done.flag");
497
459
  const psScript = [
498
- `Copy-Item -Path '${psSQ(tmpHosts)}' -Destination '${psSQ(hostsFile)}' -Force`,
499
- `& ipconfig /flushdns | Out-Null`,
500
- `Remove-Item '${psSQ(tmpHosts)}' -ErrorAction SilentlyContinue`,
501
- `Set-Content -Path '${psSQ(flagFile)}' -Value 'done' -Encoding UTF8`,
460
+ `$ErrorActionPreference = 'Stop'`,
461
+ `try {`,
462
+ ` Copy-Item -Path '${psSQ(tmpHosts)}' -Destination '${psSQ(hostsFile)}' -Force -ErrorAction Stop`,
463
+ ` ipconfig /flushdns | Out-Null`,
464
+ ` Remove-Item '${psSQ(tmpHosts)}' -ErrorAction SilentlyContinue`,
465
+ `} catch {`,
466
+ ` Remove-Item '${psSQ(tmpHosts)}' -ErrorAction SilentlyContinue`,
467
+ `}`,
502
468
  ].join("\n");
503
- const tmpPs1 = path.join(os.tmpdir(), "mitm_stop.ps1");
504
- fs.writeFileSync(tmpPs1, psScript, "utf8");
505
469
 
506
- const vbs = [
507
- `Set oShell = CreateObject("Shell.Application")`,
508
- `Dim args`,
509
- `args = "-NoProfile -ExecutionPolicy Bypass -File " & Chr(34) & "${tmpPs1}" & Chr(34)`,
510
- `oShell.ShellExecute "powershell.exe", args, "", "runas", 1`,
511
- ].join("\r\n");
512
- const tmpVbs = path.join(os.tmpdir(), "mitm_stop_uac.vbs");
513
- fs.writeFileSync(tmpVbs, vbs, "utf8");
514
- spawn("wscript.exe", [tmpVbs], { stdio: "ignore", windowsHide: false, detached: true }).unref();
515
-
516
- await new Promise((resolve) => {
517
- const deadline = Date.now() + 30000;
518
- const poll = () => {
519
- if (fs.existsSync(flagFile)) {
520
- try { fs.unlinkSync(flagFile); fs.unlinkSync(tmpPs1); fs.unlinkSync(tmpVbs); } catch { /* ignore */ }
521
- return resolve();
522
- }
523
- if (Date.now() > deadline) return resolve();
524
- setTimeout(poll, 500);
525
- };
526
- poll();
527
- });
470
+ const tmpPs1 = path.join(os.tmpdir(), `mitm_stop_${Date.now()}.ps1`);
471
+ fs.writeFileSync(tmpPs1, psScript, "utf8");
472
+ await executeElevatedPowerShell(tmpPs1, 30000);
473
+ } else {
474
+ await removeAllDNSEntries(sudoPassword);
528
475
  }
529
476
 
530
477
  try { fs.unlinkSync(PID_FILE); } catch { /* ignore */ }
package/cli.js CHANGED
@@ -126,6 +126,7 @@ function killAllAppProcesses() {
126
126
  const output = execSync('tasklist /FO CSV /V 2>nul | findstr /I "node"', {
127
127
  encoding: 'utf8',
128
128
  shell: true,
129
+ windowsHide: true,
129
130
  timeout: 5000
130
131
  });
131
132
  const lines = output.split('\n').filter(l => l.trim());
@@ -173,7 +174,7 @@ function killAllAppProcesses() {
173
174
  pids.forEach(pid => {
174
175
  try {
175
176
  if (platform === "win32") {
176
- execSync(`taskkill /F /PID ${pid} 2>nul`, { stdio: 'ignore', shell: true, timeout: 3000 });
177
+ execSync(`taskkill /F /PID ${pid} 2>nul`, { stdio: 'ignore', shell: true, windowsHide: true, timeout: 3000 });
177
178
  } else {
178
179
  execSync(`kill -9 ${pid} 2>/dev/null`, { stdio: 'ignore', timeout: 3000 });
179
180
  }
@@ -205,13 +206,14 @@ function killProcessOnPort(port) {
205
206
  try {
206
207
  const output = execSync(`netstat -ano | findstr :${port}`, {
207
208
  encoding: 'utf8',
208
- shell: true,
209
+ shell: true,
210
+ windowsHide: true,
209
211
  timeout: 5000
210
212
  }).trim();
211
213
  const lines = output.split('\n').filter(l => l.includes('LISTENING'));
212
214
  if (lines.length > 0) {
213
215
  pid = lines[0].trim().split(/\s+/).pop();
214
- execSync(`taskkill /F /PID ${pid} 2>nul`, { stdio: 'ignore', shell: true, timeout: 3000 });
216
+ execSync(`taskkill /F /PID ${pid} 2>nul`, { stdio: 'ignore', shell: true, windowsHide: true, timeout: 3000 });
215
217
  }
216
218
  } catch (e) {
217
219
  // Port is free or error
@@ -315,23 +317,23 @@ function performUpdate() {
315
317
  let updateScript, scriptPath, shellCmd;
316
318
 
317
319
  if (platform === "win32") {
318
- updateScript = `@echo off
319
- echo 📥 Installing new version...
320
- call npm cache clean --force >nul 2>&1
321
- call npm install -g ${pkg.name}@latest --prefer-online
322
-
323
- if %ERRORLEVEL% EQU 0 (
324
- echo.
325
- echo ✅ Update completed. Run "${pkg.name}" to start.
326
- ) else (
327
- echo.
328
- echo ❌ Update failed. Try manually: npm install -g ${pkg.name}@latest
329
- )
330
- pause
320
+ // Use PowerShell with hidden window to avoid console flash
321
+ updateScript = `
322
+ Write-Host "📥 Installing new version..."
323
+ npm cache clean --force 2>$null
324
+ npm install -g ${pkg.name}@latest --prefer-online 2>&1 | Out-Host
325
+ if ($LASTEXITCODE -eq 0) {
326
+ Write-Host ""
327
+ Write-Host "✅ Update completed. Run '${pkg.name}' to start."
328
+ } else {
329
+ Write-Host ""
330
+ Write-Host "❌ Update failed. Try manually: npm install -g ${pkg.name}@latest"
331
+ }
332
+ Read-Host "Press Enter to continue"
331
333
  `;
332
- scriptPath = path.join(os.tmpdir(), `${APP_NAME}-update.bat`);
334
+ scriptPath = path.join(os.tmpdir(), `${APP_NAME}-update.ps1`);
333
335
  fs.writeFileSync(scriptPath, updateScript);
334
- shellCmd = ["cmd.exe", ["/c", scriptPath]];
336
+ shellCmd = ["powershell.exe", ["-WindowStyle", "Normal", "-ExecutionPolicy", "Bypass", "-File", scriptPath]];
335
337
  } else {
336
338
  updateScript = `#!/bin/bash
337
339
  echo "📥 Installing new version..."
@@ -360,7 +362,8 @@ fi
360
362
 
361
363
  const child = spawn(shellCmd[0], shellCmd[1], {
362
364
  detached: true,
363
- stdio: "inherit"
365
+ stdio: "inherit",
366
+ windowsHide: false // Show update window intentionally for user feedback
364
367
  });
365
368
  child.unref();
366
369
  process.exit(0);
@@ -581,7 +584,7 @@ function startServer(latestVersion) {
581
584
  // Enable auto startup on OS boot
582
585
  try {
583
586
  const { enableAutoStart } = require("./src/cli/tray/autostart");
584
- const enabled = enableAutoStart();
587
+ const enabled = enableAutoStart(__filename);
585
588
  if (enabled) {
586
589
  console.log("✅ Auto-start enabled (will run on OS boot)");
587
590
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "9router",
3
- "version": "0.3.33",
3
+ "version": "0.3.35",
4
4
  "description": "9Router CLI - Start and manage 9Router server",
5
5
  "bin": {
6
6
  "9router": "./cli.js"
@@ -27,9 +27,10 @@ function getStartCommand() {
27
27
 
28
28
  /**
29
29
  * Enable auto startup on OS boot
30
+ * @param {string} cliPath - Optional path to cli.js (defaults to auto-detect)
30
31
  * @returns {boolean} success
31
32
  */
32
- function enableAutoStart() {
33
+ function enableAutoStart(cliPath) {
33
34
  const platform = process.platform;
34
35
 
35
36
  // Skip on unsupported platforms
@@ -44,11 +45,11 @@ function enableAutoStart() {
44
45
 
45
46
  try {
46
47
  if (platform === "darwin") {
47
- return enableMacOS();
48
+ return enableMacOS(cliPath);
48
49
  } else if (platform === "win32") {
49
- return enableWindows();
50
+ return enableWindows(cliPath);
50
51
  } else if (platform === "linux") {
51
- return enableLinux();
52
+ return enableLinux(cliPath);
52
53
  }
53
54
  } catch (err) {
54
55
  // Silent fail - autostart is optional
@@ -104,7 +105,7 @@ function isAutoStartEnabled() {
104
105
 
105
106
  // ============ macOS ============
106
107
 
107
- function enableMacOS() {
108
+ function enableMacOS(cliPath) {
108
109
  const launchAgentsDir = path.join(os.homedir(), "Library", "LaunchAgents");
109
110
  const plistPath = path.join(launchAgentsDir, `${APP_LABEL}.plist`);
110
111
 
@@ -116,14 +117,20 @@ function enableMacOS() {
116
117
  // Get absolute paths for node and 9router script
117
118
  const nodePath = process.execPath;
118
119
  let routerScript;
119
- try {
120
- // Resolve the actual script path (not symlink)
121
- const npmBin = execSync("npm bin -g", { encoding: "utf8", stdio: ["ignore", "pipe", "ignore"] }).trim();
122
- const routerLink = path.join(npmBin, "9router");
123
- routerScript = fs.realpathSync(routerLink);
124
- } catch (e) {
125
- // Fallback to common location
126
- routerScript = "/usr/local/lib/node_modules/9router/cli.js";
120
+
121
+ if (cliPath) {
122
+ // Use provided path (from running cli.js)
123
+ routerScript = path.resolve(cliPath);
124
+ } else {
125
+ // Fallback: try to resolve from npm bin
126
+ try {
127
+ const npmBin = execSync("npm bin -g", { encoding: "utf8", stdio: ["ignore", "pipe", "ignore"] }).trim();
128
+ const routerLink = path.join(npmBin, "9router");
129
+ routerScript = fs.realpathSync(routerLink);
130
+ } catch (e) {
131
+ // Last resort fallback
132
+ routerScript = "/usr/local/lib/node_modules/9router/cli.js";
133
+ }
127
134
  }
128
135
 
129
136
  // Determine user shell
@@ -179,7 +186,7 @@ function disableMacOS() {
179
186
 
180
187
  // ============ Windows ============
181
188
 
182
- function enableWindows() {
189
+ function enableWindows(cliPath) {
183
190
  const startupDir = path.join(process.env.APPDATA, "Microsoft", "Windows", "Start Menu", "Programs", "Startup");
184
191
  const vbsPath = path.join(startupDir, `${APP_NAME}.vbs`);
185
192
 
@@ -191,20 +198,27 @@ function enableWindows() {
191
198
  // Get absolute paths
192
199
  const nodePath = process.execPath;
193
200
  let routerScript;
194
- try {
195
- const npmBin = execSync("npm bin -g", { encoding: "utf8", shell: true, stdio: ["ignore", "pipe", "ignore"] }).trim();
196
- const routerLink = path.join(npmBin, "9router.cmd");
197
- if (fs.existsSync(routerLink)) {
198
- routerScript = routerLink;
199
- } else {
200
- // Try to resolve actual script
201
- const routerJs = path.join(npmBin, "../lib/node_modules/9router/cli.js");
202
- if (fs.existsSync(routerJs)) {
203
- routerScript = routerJs;
201
+
202
+ if (cliPath) {
203
+ // Use provided path (from running cli.js)
204
+ routerScript = path.resolve(cliPath);
205
+ } else {
206
+ // Fallback: try to resolve from npm bin
207
+ try {
208
+ const npmBin = execSync("npm bin -g", { encoding: "utf8", shell: true, stdio: ["ignore", "pipe", "ignore"] }).trim();
209
+ const routerLink = path.join(npmBin, "9router.cmd");
210
+ if (fs.existsSync(routerLink)) {
211
+ routerScript = routerLink;
212
+ } else {
213
+ // Try to resolve actual script
214
+ const routerJs = path.join(npmBin, "../lib/node_modules/9router/cli.js");
215
+ if (fs.existsSync(routerJs)) {
216
+ routerScript = routerJs;
217
+ }
204
218
  }
219
+ } catch (e) {
220
+ // Fallback
205
221
  }
206
- } catch (e) {
207
- // Fallback
208
222
  }
209
223
 
210
224
  // Create VBS script to run hidden (no console window)
@@ -242,7 +256,7 @@ function disableWindows() {
242
256
 
243
257
  // ============ Linux ============
244
258
 
245
- function enableLinux() {
259
+ function enableLinux(cliPath) {
246
260
  const autostartDir = path.join(os.homedir(), ".config", "autostart");
247
261
  const desktopPath = path.join(autostartDir, `${APP_NAME}.desktop`);
248
262
 
@@ -258,15 +272,22 @@ function enableLinux() {
258
272
  // Get absolute paths
259
273
  const nodePath = process.execPath;
260
274
  let routerScript;
261
- try {
262
- const npmBin = execSync("npm bin -g", { encoding: "utf8", stdio: ["ignore", "pipe", "ignore"] }).trim();
263
- const routerLink = path.join(npmBin, "9router");
264
- if (fs.existsSync(routerLink)) {
265
- routerScript = fs.realpathSync(routerLink);
275
+
276
+ if (cliPath) {
277
+ // Use provided path (from running cli.js)
278
+ routerScript = path.resolve(cliPath);
279
+ } else {
280
+ // Fallback: try to resolve from npm bin
281
+ try {
282
+ const npmBin = execSync("npm bin -g", { encoding: "utf8", stdio: ["ignore", "pipe", "ignore"] }).trim();
283
+ const routerLink = path.join(npmBin, "9router");
284
+ if (fs.existsSync(routerLink)) {
285
+ routerScript = fs.realpathSync(routerLink);
286
+ }
287
+ } catch (e) {
288
+ // Last resort fallback
289
+ routerScript = "/usr/local/lib/node_modules/9router/cli.js";
266
290
  }
267
- } catch (e) {
268
- // Fallback
269
- routerScript = "/usr/local/lib/node_modules/9router/cli.js";
270
291
  }
271
292
 
272
293
  const desktopContent = `[Desktop Entry]