9router 0.3.11 → 0.3.13

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 (249) hide show
  1. package/app/.next/BUILD_ID +1 -1
  2. package/app/.next/app-path-routes-manifest.json +42 -42
  3. package/app/.next/build-manifest.json +2 -2
  4. package/app/.next/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
  5. package/app/.next/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
  6. package/app/.next/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
  7. package/app/.next/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
  8. package/app/.next/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
  9. package/app/.next/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
  10. package/app/.next/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
  11. package/app/.next/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
  12. package/app/.next/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
  13. package/app/.next/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
  14. package/app/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  15. package/app/.next/server/app/_global-error.html +2 -2
  16. package/app/.next/server/app/_global-error.rsc +1 -1
  17. package/app/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  18. package/app/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  19. package/app/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  20. package/app/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  21. package/app/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  22. package/app/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  23. package/app/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  24. package/app/.next/server/app/_not-found.html +1 -1
  25. package/app/.next/server/app/_not-found.rsc +2 -2
  26. package/app/.next/server/app/_not-found.segments/_full.segment.rsc +2 -2
  27. package/app/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
  28. package/app/.next/server/app/_not-found.segments/_index.segment.rsc +2 -2
  29. package/app/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  30. package/app/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  31. package/app/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  32. package/app/.next/server/app/api/auth/login/route_client-reference-manifest.js +1 -1
  33. package/app/.next/server/app/api/auth/logout/route_client-reference-manifest.js +1 -1
  34. package/app/.next/server/app/api/cli-tools/antigravity-mitm/alias/route_client-reference-manifest.js +1 -1
  35. package/app/.next/server/app/api/cli-tools/antigravity-mitm/route_client-reference-manifest.js +1 -1
  36. package/app/.next/server/app/api/cli-tools/claude-settings/route_client-reference-manifest.js +1 -1
  37. package/app/.next/server/app/api/cli-tools/codex-settings/route_client-reference-manifest.js +1 -1
  38. package/app/.next/server/app/api/cli-tools/droid-settings/route_client-reference-manifest.js +1 -1
  39. package/app/.next/server/app/api/cli-tools/openclaw-settings/route_client-reference-manifest.js +1 -1
  40. package/app/.next/server/app/api/cloud/auth/route_client-reference-manifest.js +1 -1
  41. package/app/.next/server/app/api/cloud/credentials/update/route_client-reference-manifest.js +1 -1
  42. package/app/.next/server/app/api/cloud/model/resolve/route_client-reference-manifest.js +1 -1
  43. package/app/.next/server/app/api/cloud/models/alias/route_client-reference-manifest.js +1 -1
  44. package/app/.next/server/app/api/combos/[id]/route_client-reference-manifest.js +1 -1
  45. package/app/.next/server/app/api/combos/route_client-reference-manifest.js +1 -1
  46. package/app/.next/server/app/api/init/route_client-reference-manifest.js +1 -1
  47. package/app/.next/server/app/api/keys/[id]/route_client-reference-manifest.js +1 -1
  48. package/app/.next/server/app/api/keys/route_client-reference-manifest.js +1 -1
  49. package/app/.next/server/app/api/models/alias/route_client-reference-manifest.js +1 -1
  50. package/app/.next/server/app/api/models/route_client-reference-manifest.js +1 -1
  51. package/app/.next/server/app/api/oauth/[provider]/[action]/route_client-reference-manifest.js +1 -1
  52. package/app/.next/server/app/api/oauth/cursor/auto-import/route_client-reference-manifest.js +1 -1
  53. package/app/.next/server/app/api/oauth/cursor/import/route_client-reference-manifest.js +1 -1
  54. package/app/.next/server/app/api/oauth/kiro/auto-import/route_client-reference-manifest.js +1 -1
  55. package/app/.next/server/app/api/oauth/kiro/import/route_client-reference-manifest.js +1 -1
  56. package/app/.next/server/app/api/oauth/kiro/social-authorize/route_client-reference-manifest.js +1 -1
  57. package/app/.next/server/app/api/oauth/kiro/social-exchange/route_client-reference-manifest.js +1 -1
  58. package/app/.next/server/app/api/pricing/route_client-reference-manifest.js +1 -1
  59. package/app/.next/server/app/api/provider-nodes/[id]/route_client-reference-manifest.js +1 -1
  60. package/app/.next/server/app/api/provider-nodes/route_client-reference-manifest.js +1 -1
  61. package/app/.next/server/app/api/provider-nodes/validate/route_client-reference-manifest.js +1 -1
  62. package/app/.next/server/app/api/providers/[id]/models/route_client-reference-manifest.js +1 -1
  63. package/app/.next/server/app/api/providers/[id]/route_client-reference-manifest.js +1 -1
  64. package/app/.next/server/app/api/providers/[id]/test/route_client-reference-manifest.js +1 -1
  65. package/app/.next/server/app/api/providers/[id]/test-models/route_client-reference-manifest.js +1 -1
  66. package/app/.next/server/app/api/providers/client/route_client-reference-manifest.js +1 -1
  67. package/app/.next/server/app/api/providers/route_client-reference-manifest.js +1 -1
  68. package/app/.next/server/app/api/providers/test-batch/route_client-reference-manifest.js +1 -1
  69. package/app/.next/server/app/api/providers/validate/route_client-reference-manifest.js +1 -1
  70. package/app/.next/server/app/api/settings/database/route_client-reference-manifest.js +1 -1
  71. package/app/.next/server/app/api/settings/require-login/route_client-reference-manifest.js +1 -1
  72. package/app/.next/server/app/api/settings/route_client-reference-manifest.js +1 -1
  73. package/app/.next/server/app/api/shutdown/route_client-reference-manifest.js +1 -1
  74. package/app/.next/server/app/api/tags/route_client-reference-manifest.js +1 -1
  75. package/app/.next/server/app/api/translator/load/route_client-reference-manifest.js +1 -1
  76. package/app/.next/server/app/api/translator/save/route_client-reference-manifest.js +1 -1
  77. package/app/.next/server/app/api/translator/send/route_client-reference-manifest.js +1 -1
  78. package/app/.next/server/app/api/translator/translate/route_client-reference-manifest.js +1 -1
  79. package/app/.next/server/app/api/tunnel/disable/route_client-reference-manifest.js +1 -1
  80. package/app/.next/server/app/api/tunnel/enable/route_client-reference-manifest.js +1 -1
  81. package/app/.next/server/app/api/tunnel/status/route_client-reference-manifest.js +1 -1
  82. package/app/.next/server/app/api/usage/[connectionId]/route_client-reference-manifest.js +1 -1
  83. package/app/.next/server/app/api/usage/chart/route_client-reference-manifest.js +1 -1
  84. package/app/.next/server/app/api/usage/history/route_client-reference-manifest.js +1 -1
  85. package/app/.next/server/app/api/usage/providers/route_client-reference-manifest.js +1 -1
  86. package/app/.next/server/app/api/usage/request-details/route_client-reference-manifest.js +1 -1
  87. package/app/.next/server/app/api/usage/request-logs/route_client-reference-manifest.js +1 -1
  88. package/app/.next/server/app/api/usage/stream/route_client-reference-manifest.js +1 -1
  89. package/app/.next/server/app/api/v1/api/chat/route_client-reference-manifest.js +1 -1
  90. package/app/.next/server/app/api/v1/chat/completions/route_client-reference-manifest.js +1 -1
  91. package/app/.next/server/app/api/v1/embeddings/route_client-reference-manifest.js +1 -1
  92. package/app/.next/server/app/api/v1/messages/count_tokens/route_client-reference-manifest.js +1 -1
  93. package/app/.next/server/app/api/v1/messages/route_client-reference-manifest.js +1 -1
  94. package/app/.next/server/app/api/v1/models/route_client-reference-manifest.js +1 -1
  95. package/app/.next/server/app/api/v1/responses/route_client-reference-manifest.js +1 -1
  96. package/app/.next/server/app/api/v1/route_client-reference-manifest.js +1 -1
  97. package/app/.next/server/app/api/v1beta/models/[...path]/route_client-reference-manifest.js +1 -1
  98. package/app/.next/server/app/api/v1beta/models/route_client-reference-manifest.js +1 -1
  99. package/app/.next/server/app/callback/page_client-reference-manifest.js +1 -1
  100. package/app/.next/server/app/callback.html +1 -1
  101. package/app/.next/server/app/callback.rsc +2 -2
  102. package/app/.next/server/app/callback.segments/_full.segment.rsc +2 -2
  103. package/app/.next/server/app/callback.segments/_head.segment.rsc +1 -1
  104. package/app/.next/server/app/callback.segments/_index.segment.rsc +2 -2
  105. package/app/.next/server/app/callback.segments/_tree.segment.rsc +1 -1
  106. package/app/.next/server/app/callback.segments/callback/__PAGE__.segment.rsc +1 -1
  107. package/app/.next/server/app/callback.segments/callback.segment.rsc +1 -1
  108. package/app/.next/server/app/dashboard/cli-tools.html +1 -1
  109. package/app/.next/server/app/dashboard/cli-tools.rsc +4 -4
  110. package/app/.next/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +2 -2
  111. package/app/.next/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools.segment.rsc +1 -1
  112. package/app/.next/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  113. package/app/.next/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  114. package/app/.next/server/app/dashboard/cli-tools.segments/_full.segment.rsc +4 -4
  115. package/app/.next/server/app/dashboard/cli-tools.segments/_head.segment.rsc +1 -1
  116. package/app/.next/server/app/dashboard/cli-tools.segments/_index.segment.rsc +2 -2
  117. package/app/.next/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +1 -1
  118. package/app/.next/server/app/dashboard/combos.html +1 -1
  119. package/app/.next/server/app/dashboard/combos.rsc +4 -4
  120. package/app/.next/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +2 -2
  121. package/app/.next/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos.segment.rsc +1 -1
  122. package/app/.next/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  123. package/app/.next/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  124. package/app/.next/server/app/dashboard/combos.segments/_full.segment.rsc +4 -4
  125. package/app/.next/server/app/dashboard/combos.segments/_head.segment.rsc +1 -1
  126. package/app/.next/server/app/dashboard/combos.segments/_index.segment.rsc +2 -2
  127. package/app/.next/server/app/dashboard/combos.segments/_tree.segment.rsc +1 -1
  128. package/app/.next/server/app/dashboard/endpoint.html +1 -1
  129. package/app/.next/server/app/dashboard/endpoint.rsc +4 -4
  130. package/app/.next/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +2 -2
  131. package/app/.next/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint.segment.rsc +1 -1
  132. package/app/.next/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  133. package/app/.next/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  134. package/app/.next/server/app/dashboard/endpoint.segments/_full.segment.rsc +4 -4
  135. package/app/.next/server/app/dashboard/endpoint.segments/_head.segment.rsc +1 -1
  136. package/app/.next/server/app/dashboard/endpoint.segments/_index.segment.rsc +2 -2
  137. package/app/.next/server/app/dashboard/endpoint.segments/_tree.segment.rsc +1 -1
  138. package/app/.next/server/app/dashboard/profile.html +1 -1
  139. package/app/.next/server/app/dashboard/profile.rsc +4 -4
  140. package/app/.next/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +2 -2
  141. package/app/.next/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile.segment.rsc +1 -1
  142. package/app/.next/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  143. package/app/.next/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  144. package/app/.next/server/app/dashboard/profile.segments/_full.segment.rsc +4 -4
  145. package/app/.next/server/app/dashboard/profile.segments/_head.segment.rsc +1 -1
  146. package/app/.next/server/app/dashboard/profile.segments/_index.segment.rsc +2 -2
  147. package/app/.next/server/app/dashboard/profile.segments/_tree.segment.rsc +1 -1
  148. package/app/.next/server/app/dashboard/providers/new.html +1 -1
  149. package/app/.next/server/app/dashboard/providers/new.rsc +4 -4
  150. package/app/.next/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +2 -2
  151. package/app/.next/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new.segment.rsc +1 -1
  152. package/app/.next/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
  153. package/app/.next/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  154. package/app/.next/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  155. package/app/.next/server/app/dashboard/providers/new.segments/_full.segment.rsc +4 -4
  156. package/app/.next/server/app/dashboard/providers/new.segments/_head.segment.rsc +1 -1
  157. package/app/.next/server/app/dashboard/providers/new.segments/_index.segment.rsc +2 -2
  158. package/app/.next/server/app/dashboard/providers/new.segments/_tree.segment.rsc +1 -1
  159. package/app/.next/server/app/dashboard/providers.html +1 -1
  160. package/app/.next/server/app/dashboard/providers.rsc +4 -4
  161. package/app/.next/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +2 -2
  162. package/app/.next/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
  163. package/app/.next/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  164. package/app/.next/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  165. package/app/.next/server/app/dashboard/providers.segments/_full.segment.rsc +4 -4
  166. package/app/.next/server/app/dashboard/providers.segments/_head.segment.rsc +1 -1
  167. package/app/.next/server/app/dashboard/providers.segments/_index.segment.rsc +2 -2
  168. package/app/.next/server/app/dashboard/providers.segments/_tree.segment.rsc +1 -1
  169. package/app/.next/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
  170. package/app/.next/server/app/dashboard/settings/pricing.html +1 -1
  171. package/app/.next/server/app/dashboard/settings/pricing.rsc +2 -2
  172. package/app/.next/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +2 -2
  173. package/app/.next/server/app/dashboard/settings/pricing.segments/_head.segment.rsc +1 -1
  174. package/app/.next/server/app/dashboard/settings/pricing.segments/_index.segment.rsc +2 -2
  175. package/app/.next/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +1 -1
  176. package/app/.next/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +1 -1
  177. package/app/.next/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing.segment.rsc +1 -1
  178. package/app/.next/server/app/dashboard/settings/pricing.segments/dashboard/settings.segment.rsc +1 -1
  179. package/app/.next/server/app/dashboard/settings/pricing.segments/dashboard.segment.rsc +1 -1
  180. package/app/.next/server/app/dashboard/translator.html +1 -1
  181. package/app/.next/server/app/dashboard/translator.rsc +4 -4
  182. package/app/.next/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +2 -2
  183. package/app/.next/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator.segment.rsc +1 -1
  184. package/app/.next/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  185. package/app/.next/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  186. package/app/.next/server/app/dashboard/translator.segments/_full.segment.rsc +4 -4
  187. package/app/.next/server/app/dashboard/translator.segments/_head.segment.rsc +1 -1
  188. package/app/.next/server/app/dashboard/translator.segments/_index.segment.rsc +2 -2
  189. package/app/.next/server/app/dashboard/translator.segments/_tree.segment.rsc +1 -1
  190. package/app/.next/server/app/dashboard/usage.html +1 -1
  191. package/app/.next/server/app/dashboard/usage.rsc +4 -4
  192. package/app/.next/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +2 -2
  193. package/app/.next/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage.segment.rsc +1 -1
  194. package/app/.next/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  195. package/app/.next/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  196. package/app/.next/server/app/dashboard/usage.segments/_full.segment.rsc +4 -4
  197. package/app/.next/server/app/dashboard/usage.segments/_head.segment.rsc +1 -1
  198. package/app/.next/server/app/dashboard/usage.segments/_index.segment.rsc +2 -2
  199. package/app/.next/server/app/dashboard/usage.segments/_tree.segment.rsc +1 -1
  200. package/app/.next/server/app/dashboard.html +1 -1
  201. package/app/.next/server/app/dashboard.rsc +4 -4
  202. package/app/.next/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +2 -2
  203. package/app/.next/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  204. package/app/.next/server/app/dashboard.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  205. package/app/.next/server/app/dashboard.segments/_full.segment.rsc +4 -4
  206. package/app/.next/server/app/dashboard.segments/_head.segment.rsc +1 -1
  207. package/app/.next/server/app/dashboard.segments/_index.segment.rsc +2 -2
  208. package/app/.next/server/app/dashboard.segments/_tree.segment.rsc +1 -1
  209. package/app/.next/server/app/index.html +1 -1
  210. package/app/.next/server/app/index.rsc +2 -2
  211. package/app/.next/server/app/index.segments/__PAGE__.segment.rsc +1 -1
  212. package/app/.next/server/app/index.segments/_full.segment.rsc +2 -2
  213. package/app/.next/server/app/index.segments/_head.segment.rsc +1 -1
  214. package/app/.next/server/app/index.segments/_index.segment.rsc +2 -2
  215. package/app/.next/server/app/index.segments/_tree.segment.rsc +1 -1
  216. package/app/.next/server/app/landing/page_client-reference-manifest.js +1 -1
  217. package/app/.next/server/app/landing.html +1 -1
  218. package/app/.next/server/app/landing.rsc +2 -2
  219. package/app/.next/server/app/landing.segments/_full.segment.rsc +2 -2
  220. package/app/.next/server/app/landing.segments/_head.segment.rsc +1 -1
  221. package/app/.next/server/app/landing.segments/_index.segment.rsc +2 -2
  222. package/app/.next/server/app/landing.segments/_tree.segment.rsc +1 -1
  223. package/app/.next/server/app/landing.segments/landing/__PAGE__.segment.rsc +1 -1
  224. package/app/.next/server/app/landing.segments/landing.segment.rsc +1 -1
  225. package/app/.next/server/app/login/page_client-reference-manifest.js +1 -1
  226. package/app/.next/server/app/login.html +1 -1
  227. package/app/.next/server/app/login.rsc +3 -3
  228. package/app/.next/server/app/login.segments/_full.segment.rsc +3 -3
  229. package/app/.next/server/app/login.segments/_head.segment.rsc +1 -1
  230. package/app/.next/server/app/login.segments/_index.segment.rsc +2 -2
  231. package/app/.next/server/app/login.segments/_tree.segment.rsc +1 -1
  232. package/app/.next/server/app/login.segments/login/__PAGE__.segment.rsc +2 -2
  233. package/app/.next/server/app/login.segments/login.segment.rsc +1 -1
  234. package/app/.next/server/app/manifest.webmanifest/route.js.nft.json +1 -1
  235. package/app/.next/server/app/manifest.webmanifest/route_client-reference-manifest.js +1 -1
  236. package/app/.next/server/app/page_client-reference-manifest.js +1 -1
  237. package/app/.next/server/app-paths-manifest.json +42 -42
  238. package/app/.next/server/chunks/6186.js +13 -13
  239. package/app/.next/server/chunks/8694.js +1 -1
  240. package/app/.next/server/pages/404.html +1 -1
  241. package/app/.next/server/pages/500.html +2 -2
  242. package/app/.next/server/server-reference-manifest.js +1 -1
  243. package/app/.next/server/server-reference-manifest.json +1 -1
  244. package/app/.next/static/chunks/{8729-ec583a007f4f3da0.js → 8729-42dde495fe569d68.js} +1 -1
  245. package/app/package.json +1 -1
  246. package/app/src/mitm/manager.js +157 -90
  247. package/package.json +1 -1
  248. /package/app/.next/static/{bkE60le6wgGugItzX3ebk → yC8H_CC0ny77zOPSnRacp}/_buildManifest.js +0 -0
  249. /package/app/.next/static/{bkE60le6wgGugItzX3ebk → yC8H_CC0ny77zOPSnRacp}/_ssgManifest.js +0 -0
@@ -12,6 +12,8 @@ const { generateCert } = require("./cert/generate");
12
12
  const { installCert } = require("./cert/install");
13
13
 
14
14
  const MITM_PORT = 443;
15
+ // Windows: node listens on 8443, netsh portproxy forwards 443→8443
16
+ const MITM_WIN_NODE_PORT = 8443;
15
17
  const PID_FILE = path.join(os.homedir(), ".9router", "mitm", ".mitm.pid");
16
18
 
17
19
  // Resolve server.js path robustly:
@@ -275,12 +277,12 @@ async function killLeftoverMitm(sudoPassword) {
275
277
  * Poll MITM health endpoint until server is up or timeout.
276
278
  * Returns { ok, pid } on success, null on timeout.
277
279
  */
278
- function pollMitmHealth(timeoutMs) {
280
+ function pollMitmHealth(timeoutMs, port = MITM_PORT) {
279
281
  return new Promise((resolve) => {
280
282
  const deadline = Date.now() + timeoutMs;
281
283
  const check = () => {
282
284
  const req = https.request(
283
- { hostname: "127.0.0.1", port: 443, path: "/_mitm_health", method: "GET", rejectUnauthorized: false },
285
+ { hostname: "127.0.0.1", port, path: "/_mitm_health", method: "GET", rejectUnauthorized: false },
284
286
  (res) => {
285
287
  let body = "";
286
288
  res.on("data", (d) => { body += d; });
@@ -366,34 +368,28 @@ async function startMitm(apiKey, sudoPassword) {
366
368
  // Kill any leftover MITM server from a previous failed start attempt
367
369
  await killLeftoverMitm(sudoPassword);
368
370
 
369
- // Check port 443 availability BEFORE modifying system
370
- // "no-permission" = EACCES: port may be held by a root process, check via lsof/netstat
371
- const portStatus = await checkPort443Free();
372
- if (portStatus === "in-use" || portStatus === "no-permission") {
373
- const owner = await getPort443Owner(sudoPassword);
374
- if (owner && owner.name === "node") {
375
- // Orphan MITM node process — kill it and continue
376
- console.log(`[MITM] Killing orphan node process on port 443 (PID ${owner.pid})...`);
377
- try {
378
- if (IS_WIN) {
379
- await new Promise((resolve) => exec(`taskkill /F /PID ${owner.pid}`, resolve));
380
- } else {
371
+ if (!IS_WIN) {
372
+ // Check port 443 availability Windows handles this inside elevated script
373
+ const portStatus = await checkPort443Free();
374
+ if (portStatus === "in-use" || portStatus === "no-permission") {
375
+ const owner = await getPort443Owner(sudoPassword);
376
+ if (owner && owner.name === "node") {
377
+ // Orphan MITM node process — kill it and continue
378
+ console.log(`[MITM] Killing orphan node process on port 443 (PID ${owner.pid})...`);
379
+ try {
381
380
  const { execWithPassword } = require("./dns/dnsConfig");
382
381
  await execWithPassword(`kill -9 ${owner.pid}`, sudoPassword);
383
- }
384
- await new Promise(r => setTimeout(r, 800));
385
- } catch {
386
- // best effort — continue anyway
382
+ await new Promise(r => setTimeout(r, 800));
383
+ } catch { /* best effort */ }
384
+ } else if (owner) {
385
+ const shortName = owner.name.includes("/")
386
+ ? owner.name.split("/").filter(Boolean).pop()
387
+ : owner.name;
388
+ throw new Error(
389
+ `Port 443 is already in use by "${shortName}" (PID ${owner.pid}). Stop that process first, then retry.`
390
+ );
387
391
  }
388
- } else if (owner) {
389
- const shortName = owner.name.includes("/")
390
- ? owner.name.split("/").filter(Boolean).pop()
391
- : owner.name;
392
- throw new Error(
393
- `Port 443 is already in use by "${shortName}" (PID ${owner.pid}). Stop that process first, then retry.`
394
- );
395
392
  }
396
- // owner === null + no-permission → likely just needs sudo, proceed
397
393
  }
398
394
 
399
395
  // 1. Generate SSL certificate if not exists (no elevation needed)
@@ -407,64 +403,86 @@ async function startMitm(apiKey, sudoPassword) {
407
403
  console.log("Starting MITM server...");
408
404
 
409
405
  if (IS_WIN) {
406
+ // Windows: single UAC via VBScript → elevated PowerShell script that:
407
+ // 1. Installs SSL cert 2. Adds DNS entries 3. Starts node server.js (elevated → can bind 443) 4. Writes flag
408
+ // Node polls flag file to know when server is ready, then health-checks port 443
410
409
  const hostsFile = path.join(process.env.SystemRoot || "C:\\Windows", "System32", "drivers", "etc", "hosts");
411
410
  const TARGET_HOSTS_WIN = ["daily-cloudcode-pa.googleapis.com", "cloudcode-pa.googleapis.com"];
412
- const esc = (s) => s.replace(/'/g, "''");
413
- const certPsPath = esc(certPath);
414
- const hostsPsPath = esc(hostsFile);
415
411
 
416
- // Check if one-time setup is already done (urlacl granted + cert installed + DNS added)
417
- const settings = _getSettings ? await _getSettings().catch(() => ({})) : {};
418
- const setupDone = settings.mitmWinSetupDone && fs.existsSync(certPath) && checkDNSEntry();
419
-
420
- if (!setupDone) {
421
- // Phase 1: single UAC prompt — cert + DNS + netsh urlacl (one-time setup)
422
- const dnsAddLines = TARGET_HOSTS_WIN.map(h =>
423
- `$hc = Get-Content -Path '${hostsPsPath}' -Raw -ErrorAction SilentlyContinue; if ($hc -notmatch '${h}') { Add-Content -Path '${hostsPsPath}' -Value "127.0.0.1 ${h}" -Encoding UTF8 }`
424
- ).join("\n");
425
-
426
- const setupScript = `
427
- # 1. Install cert to Root store
428
- $certCheck = & certutil -store Root 'daily-cloudcode-pa.googleapis.com' 2>&1
429
- if ($LASTEXITCODE -ne 0) { & certutil -addstore Root '${certPsPath}' | Out-Null }
430
-
431
- # 2. Add DNS entries
432
- ${dnsAddLines}
433
- & ipconfig /flushdns | Out-Null
434
-
435
- # 3. Grant current user permission to bind port 443 (no more UAC needed after this)
436
- $sid = [System.Security.Principal.WindowsIdentity]::GetCurrent().User.Value
437
- & netsh http add urlacl url=https://+:443/ sddl="D:(A;;GX;;;$sid)" | Out-Null
438
- `.trim();
439
-
440
- const tmpSetup = path.join(os.tmpdir(), `mitm_setup_${Date.now()}.ps1`);
441
- fs.writeFileSync(tmpSetup, setupScript, "utf8");
442
-
443
- // Run elevated — this is the ONLY UAC prompt
444
- await new Promise((resolve, reject) => {
445
- const launcher = spawn("powershell", [
446
- "-NoProfile", "-NonInteractive", "-WindowStyle", "Hidden",
447
- "-Command",
448
- `Start-Process powershell -ArgumentList '-NoProfile -NonInteractive -WindowStyle Hidden -ExecutionPolicy Bypass -File \\"${esc(tmpSetup)}\\"' -Verb RunAs -Wait; Remove-Item '${esc(tmpSetup)}' -ErrorAction SilentlyContinue`
449
- ], { stdio: "ignore", windowsHide: true });
450
- launcher.on("close", (code) => {
451
- if (code === 0) resolve();
452
- else reject(new Error(`Setup script failed with code ${code}`));
453
- });
454
- launcher.on("error", reject);
455
- });
456
-
457
- if (_updateSettings) await _updateSettings({ mitmWinSetupDone: true, mitmCertInstalled: true }).catch(() => { });
458
- }
459
-
460
- // Phase 2: spawn node directly no UAC needed (urlacl already granted)
461
- serverProcess = spawn(process.execPath, [SERVER_PATH], {
462
- detached: true,
463
- stdio: "ignore",
464
- windowsHide: true,
465
- env: { ...process.env, ROUTER_API_KEY: apiKey, NODE_ENV: "production" },
412
+ // Use Chr(34) in VBScript for quotes avoid escaping issues
413
+ const flagFile = path.join(os.tmpdir(), `mitm_ready_${Date.now()}.flag`);
414
+
415
+ // PowerShell uses single-quoted strings — escape single quotes only
416
+ const psSQ = (s) => s.replace(/'/g, "''");
417
+ const certPs = psSQ(certPath);
418
+ const hostsPs = psSQ(hostsFile);
419
+ const nodePs = psSQ(process.execPath);
420
+ const serverPs = psSQ(SERVER_PATH);
421
+ const flagPs = psSQ(flagFile);
422
+
423
+ const dnsLines = TARGET_HOSTS_WIN.map(h =>
424
+ `$hc = Get-Content -Path '${hostsPs}' -Raw -ErrorAction SilentlyContinue\n` +
425
+ `if ($hc -notmatch [regex]::Escape('${h}')) { Add-Content -Path '${hostsPs}' -Value '127.0.0.1 ${h}' -Encoding UTF8 }`
426
+ ).join("\n");
427
+
428
+ const psScript = [
429
+ `# 0. Kill any orphan node process on port 443`,
430
+ `$conn = Get-NetTCPConnection -LocalPort 443 -State Listen -ErrorAction SilentlyContinue | Select-Object -First 1`,
431
+ `if ($conn -and $conn.OwningProcess -gt 4) { Stop-Process -Id $conn.OwningProcess -Force -ErrorAction SilentlyContinue }`,
432
+ `Start-Sleep -Milliseconds 500`,
433
+ ``,
434
+ `# 1. Install SSL cert to Windows Root store`,
435
+ `$c = & certutil -store Root 'daily-cloudcode-pa.googleapis.com' 2>&1`,
436
+ `if ($LASTEXITCODE -ne 0) { & certutil -addstore Root '${certPs}' | Out-Null }`,
437
+ ``,
438
+ `# 2. Add DNS entries to hosts file`,
439
+ dnsLines,
440
+ `& ipconfig /flushdns | Out-Null`,
441
+ ``,
442
+ `# 3. Start node MITM server elevated (required to bind port 443)`,
443
+ `$env:ROUTER_API_KEY = '${psSQ(apiKey)}'`,
444
+ `$env:NODE_ENV = 'production'`,
445
+ `Start-Process -FilePath '${nodePs}' -ArgumentList '${serverPs}' -WindowStyle Hidden`,
446
+ ``,
447
+ `# 4. Signal ready`,
448
+ `Start-Sleep -Milliseconds 500`,
449
+ `Set-Content -Path '${flagPs}' -Value 'ready' -Encoding UTF8`,
450
+ ].join("\n");
451
+
452
+ const tmpPs1 = path.join(os.tmpdir(), `mitm_start_${Date.now()}.ps1`);
453
+ fs.writeFileSync(tmpPs1, psScript, "utf8");
454
+
455
+ // VBScript uses Shell.Application.ShellExecute to trigger UAC from any context
456
+ // Chr(34) = double-quote, avoids VBScript string escaping issues
457
+ const vbs = [
458
+ `Set oShell = CreateObject("Shell.Application")`,
459
+ `Dim ps`,
460
+ `ps = Chr(34) & "powershell.exe" & Chr(34)`,
461
+ `Dim args`,
462
+ `args = "-NoProfile -ExecutionPolicy Bypass -File " & Chr(34) & "${tmpPs1.replace(/\\/g, "\\\\")}" & Chr(34)`,
463
+ `oShell.ShellExecute ps, args, "", "runas", 1`,
464
+ ].join("\r\n");
465
+ const tmpVbs = path.join(os.tmpdir(), `mitm_uac_${Date.now()}.vbs`);
466
+ fs.writeFileSync(tmpVbs, vbs, "utf8");
467
+
468
+ // Launch VBScript — shows UAC dialog, user confirms, script runs elevated
469
+ spawn("wscript.exe", [tmpVbs], { stdio: "ignore", windowsHide: false, detached: true }).unref();
470
+
471
+ // Poll flag file — resolves when elevated script completes
472
+ await new Promise((resolve, reject) => {
473
+ const deadline = Date.now() + 90000; // 90s: UAC wait + cert install + node start
474
+ const poll = () => {
475
+ if (fs.existsSync(flagFile)) {
476
+ try { fs.unlinkSync(flagFile); fs.unlinkSync(tmpPs1); fs.unlinkSync(tmpVbs); } catch { /* ignore */ }
477
+ return resolve();
478
+ }
479
+ if (Date.now() > deadline) return reject(new Error("Timed out waiting for UAC confirmation. Please try again."));
480
+ setTimeout(poll, 500);
481
+ };
482
+ poll();
466
483
  });
467
- serverProcess.unref();
484
+
485
+ if (_updateSettings) await _updateSettings({ mitmCertInstalled: true }).catch(() => { });
468
486
  } else {
469
487
  // macOS/Linux: install cert + add DNS (requires sudo), then spawn server
470
488
  const settings = _getSettings ? await _getSettings().catch(() => ({})) : {};
@@ -487,8 +505,11 @@ $sid = [System.Security.Principal.WindowsIdentity]::GetCurrent().User.Value
487
505
  serverProcess.stdin.end();
488
506
  }
489
507
 
490
- serverPid = serverProcess.pid;
491
- fs.writeFileSync(PID_FILE, String(serverPid));
508
+ // Windows: node was started by elevated script — PID comes from health check later
509
+ if (!IS_WIN && serverProcess) {
510
+ serverPid = serverProcess.pid;
511
+ fs.writeFileSync(PID_FILE, String(serverPid));
512
+ }
492
513
 
493
514
  let startError = null;
494
515
  if (!IS_WIN) {
@@ -511,9 +532,8 @@ $sid = [System.Security.Principal.WindowsIdentity]::GetCurrent().User.Value
511
532
  });
512
533
  }
513
534
 
514
- // Wait for server to be ready by polling health endpoint
515
- // Windows: allow extra time for urlacl setup + node startup on first run
516
- const health = await pollMitmHealth(IS_WIN ? 20000 : 8000);
535
+ // Wait for server to be ready by polling health endpoint on port 443
536
+ const health = await pollMitmHealth(IS_WIN ? 15000 : 8000, MITM_PORT);
517
537
 
518
538
  if (!health) {
519
539
  if (IS_WIN) serverProcess = null;
@@ -568,14 +588,61 @@ async function stopMitm(sudoPassword) {
568
588
  serverPid = null;
569
589
  }
570
590
 
571
- console.log("Removing DNS entry...");
572
- await removeDNSEntry(sudoPassword);
591
+ if (IS_WIN) {
592
+ // Windows stop: remove DNS entries via elevated VBScript (1 UAC)
593
+ const hostsFile = path.join(process.env.SystemRoot || "C:\\Windows", "System32", "drivers", "etc", "hosts");
594
+ const TARGET_HOSTS_WIN = ["daily-cloudcode-pa.googleapis.com", "cloudcode-pa.googleapis.com"];
595
+ const psSQ = (s) => s.replace(/'/g, "''");
596
+
597
+ // Filter hosts content in Node (read doesn't need elevation)
598
+ let hostsContent = "";
599
+ try { hostsContent = fs.readFileSync(hostsFile, "utf8"); } catch { /* ignore */ }
600
+ const filtered = hostsContent.split(/\r?\n/)
601
+ .filter(l => !TARGET_HOSTS_WIN.some(h => l.includes(h)))
602
+ .join("\r\n");
603
+ const tmpHosts = path.join(os.tmpdir(), "mitm_hosts_clean.tmp");
604
+ fs.writeFileSync(tmpHosts, filtered, "utf8");
605
+
606
+ const flagFile = path.join(os.tmpdir(), "mitm_stop_done.flag");
607
+ const psScript = [
608
+ `Copy-Item -Path '${psSQ(tmpHosts)}' -Destination '${psSQ(hostsFile)}' -Force`,
609
+ `& ipconfig /flushdns | Out-Null`,
610
+ `Remove-Item '${psSQ(tmpHosts)}' -ErrorAction SilentlyContinue`,
611
+ `Set-Content -Path '${psSQ(flagFile)}' -Value 'done' -Encoding UTF8`,
612
+ ].join("\n");
613
+ const tmpPs1 = path.join(os.tmpdir(), "mitm_stop.ps1");
614
+ fs.writeFileSync(tmpPs1, psScript, "utf8");
615
+
616
+ const vbs = [
617
+ `Set oShell = CreateObject("Shell.Application")`,
618
+ `Dim args`,
619
+ `args = "-NoProfile -ExecutionPolicy Bypass -File " & Chr(34) & "${tmpPs1.replace(/\\/g, "\\\\")}" & Chr(34)`,
620
+ `oShell.ShellExecute "powershell.exe", args, "", "runas", 1`,
621
+ ].join("\r\n");
622
+ const tmpVbs = path.join(os.tmpdir(), "mitm_stop_uac.vbs");
623
+ fs.writeFileSync(tmpVbs, vbs, "utf8");
624
+ spawn("wscript.exe", [tmpVbs], { stdio: "ignore", windowsHide: false, detached: true }).unref();
625
+
626
+ // Poll flag — best effort, don't block UI if user cancels UAC
627
+ await new Promise((resolve) => {
628
+ const deadline = Date.now() + 30000;
629
+ const poll = () => {
630
+ if (fs.existsSync(flagFile)) {
631
+ try { fs.unlinkSync(flagFile); fs.unlinkSync(tmpPs1); fs.unlinkSync(tmpVbs); } catch { /* ignore */ }
632
+ return resolve();
633
+ }
634
+ if (Date.now() > deadline) return resolve();
635
+ setTimeout(poll, 500);
636
+ };
637
+ poll();
638
+ });
639
+ } else {
640
+ console.log("Removing DNS entry...");
641
+ await removeDNSEntry(sudoPassword);
642
+ }
573
643
 
574
644
  try { fs.unlinkSync(PID_FILE); } catch { /* ignore */ }
575
645
 
576
- // Reset win setup flag so DNS gets re-added on next start
577
- if (IS_WIN && _updateSettings) await _updateSettings({ mitmWinSetupDone: false }).catch(() => { });
578
-
579
646
  await saveMitmSettings(false, null);
580
647
 
581
648
  return { running: false, pid: null };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "9router",
3
- "version": "0.3.11",
3
+ "version": "0.3.13",
4
4
  "description": "9Router CLI - Start and manage 9Router server",
5
5
  "bin": {
6
6
  "9router": "./cli.js"