Fix : noAuth support for providers and adjusted MITM restart settings.

This commit is contained in:
decolua
2026-04-14 10:14:50 +07:00
parent 7959fd37ad
commit 6a6e2fcd77
9 changed files with 23 additions and 14 deletions
@@ -865,7 +865,7 @@ export default function ProviderDetailPage() {
<h2 className="text-lg font-semibold">Connections</h2>
<div className="flex items-center gap-4">
{/* Thinking config */}
{/* {thinkingConfig && (
{thinkingConfig && (
<div className="flex items-center gap-2">
<span className="text-xs text-text-muted font-medium">Thinking</span>
<select
@@ -878,7 +878,7 @@ export default function ProviderDetailPage() {
))}
</select>
</div>
)} */}
)}
{/* Round Robin toggle */}
<div className="flex items-center gap-2">
<span className="text-xs text-text-muted font-medium">Round Robin</span>
+1 -1
View File
@@ -5,7 +5,7 @@ export async function GET() {
try {
const settings = await getSettings();
const requireLogin = settings.requireLogin !== false;
const tunnelDashboardAccess = settings.tunnelDashboardAccess === true;
const tunnelDashboardAccess = settings.tunnelDashboardAccess !== false;
const tunnelUrl = settings.tunnelUrl || "";
const tailscaleUrl = settings.tailscaleUrl || "";
return NextResponse.json({ requireLogin, tunnelDashboardAccess, tunnelUrl, tailscaleUrl });
+1 -1
View File
@@ -74,7 +74,7 @@ export async function proxy(request) {
if (pathname.startsWith("/dashboard")) {
const origin = request.nextUrl.origin;
let requireLogin = true;
let tunnelDashboardAccess = false;
let tunnelDashboardAccess = true;
try {
const res = await fetch(`${origin}/api/settings/require-login`);
+4 -3
View File
@@ -40,8 +40,8 @@ const MITM_PORT = 443;
const MITM_WIN_NODE_PORT = 8443;
const PID_FILE = path.join(MITM_DIR, ".mitm.pid");
const MITM_MAX_RESTARTS = 5;
const MITM_RESTART_DELAYS_MS = [5000, 10000, 20000, 30000, 60000];
const MITM_MAX_RESTARTS = 2;
const MITM_RESTART_DELAYS_MS = [5000, 10000];
const MITM_RESTART_RESET_MS = 60000;
let mitmRestartCount = 0;
@@ -323,7 +323,8 @@ async function scheduleMitmRestart(apiKey) {
if (aliveMs >= MITM_RESTART_RESET_MS) mitmRestartCount = 0;
if (mitmRestartCount >= MITM_MAX_RESTARTS) {
err("Max restart attempts reached. Giving up.");
err("Max restart attempts reached. Auto-disabling MITM.");
await saveMitmSettings(false, null);
return;
}