Skip to content

Commit c67a433

Browse files
feat: add port protection toggle, fix kernel auto-update cleanup and UI refresh (#91)
* refactor: rename BotBrowserConsole to BotBrowserLauncher * feat: add kernel management, proxy management, and setup scripts * fix: enable macOS native Edit menu for Cmd+C/V/X/A keyboard shortcuts * chore: upgrade Neutralino runtime to 6.4.0 * chore: remove Neutralino binaries from repo, download via neu update * fix: improve macOS clipboard support with JS fallback for Cmd+V paste * fix: expand macOS clipboard fallback to Cmd+C/X, auto-download Neutralino via postinstall * chore: upgrade Neutralino to 6.5.0 and simplify setup scripts * fix: fix PowerShell setup script ZIP download corruption * feat: enhance proxy workflow with IP check, quick change, and reusable input component * fix: correct checkbox color override and setup script stdin handling * feat: improve profile deletion with auto-stop, group WebRTC settings, prioritize custom exec path * feat: add port protection toggle, fix kernel auto-update cleanup and UI refresh
1 parent 01c35f2 commit c67a433

7 files changed

Lines changed: 22 additions & 2 deletions

File tree

launcher/src/app/data/browser-profile.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ export interface BehaviorToggles {
7575
botAlwaysActive?: boolean;
7676
botInjectRandomHistory?: boolean;
7777
botDisableConsoleMessage?: boolean;
78+
botPortProtection?: boolean;
7879
}
7980

8081
// Identity & Locale config

launcher/src/app/edit-browser-profile.component.html

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -430,6 +430,11 @@ <h2 mat-dialog-title>{{ isEdit ? 'Edit' : 'Create' }} Browser Profile</h2>
430430
Inject Random History
431431
<span class="toggle-hint">Add random history (default: off)</span>
432432
</mat-slide-toggle>
433+
434+
<mat-slide-toggle formControlName="botPortProtection">
435+
Port Protection
436+
<span class="toggle-hint">Protect local ports from scanning (default: off)</span>
437+
</mat-slide-toggle>
433438
</form>
434439
</div>
435440

launcher/src/app/edit-browser-profile.component.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@ export class EditBrowserProfileComponent implements OnInit {
137137
botAlwaysActive: this.#injectedData?.launchOptions?.behavior?.botAlwaysActive ?? true,
138138
botInjectRandomHistory: this.#injectedData?.launchOptions?.behavior?.botInjectRandomHistory,
139139
botDisableConsoleMessage: this.#injectedData?.launchOptions?.behavior?.botDisableConsoleMessage ?? true,
140+
botPortProtection: this.#injectedData?.launchOptions?.behavior?.botPortProtection,
140141
});
141142

142143
// Identity & Locale - default: browserBrand=chrome

launcher/src/app/kernel-management/kernel-management.component.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { CommonModule } from '@angular/common';
2-
import { Component, inject, type OnInit } from '@angular/core';
2+
import { Component, effect, inject, type OnInit } from '@angular/core';
33
import { MatButtonModule } from '@angular/material/button';
44
import { MatDialog, MatDialogModule } from '@angular/material/dialog';
55
import { MatIconModule } from '@angular/material/icon';
@@ -39,6 +39,13 @@ export class KernelManagementComponent implements OnInit {
3939
loadingReleases = false;
4040
error: string | null = null;
4141

42+
constructor() {
43+
effect(() => {
44+
this.#kernelService.installedKernelsVersion();
45+
this.refresh();
46+
});
47+
}
48+
4249
// Check if a specific release is being downloaded
4350
isDownloading(tagName: string): boolean {
4451
return this.#kernelService.isDownloading(tagName);

launcher/src/app/shared/browser-launcher.service.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,7 @@ export class BrowserLauncherService {
228228
if (opts?.behavior?.botAlwaysActive) args.push('--bot-always-active');
229229
if (opts?.behavior?.botInjectRandomHistory) args.push('--bot-inject-random-history');
230230
if (opts?.behavior?.botDisableConsoleMessage) args.push('--bot-disable-console-message');
231+
if (opts?.behavior?.botPortProtection) args.push('--bot-port-protection');
231232

232233
// Identity & Locale
233234
if (opts?.identityLocale?.botConfigBrowserBrand) {

launcher/src/app/shared/kernel.service.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ export class KernelService {
3434
// Support multiple concurrent downloads - use tagName as key
3535
readonly downloadProgresses = signal<DownloadProgress[]>([]);
3636
readonly isAutoUpdating = signal(false);
37+
readonly installedKernelsVersion = signal(0);
3738

3839
#installedKernels: InstalledKernel[] = [];
3940
#currentPlatform: KernelPlatform = 'win_x86_64';
@@ -66,6 +67,9 @@ export class KernelService {
6667
// Auto-update installed kernels to newer releases
6768
await this.#autoUpdateKernels();
6869

70+
// Clean up again after auto-update to remove old versions replaced by new downloads
71+
await this.#cleanupOldKernels();
72+
6973
// Auto-download the latest release if no kernels installed
7074
await this.#autoDownloadLatest();
7175
} catch (error) {
@@ -1056,5 +1060,6 @@ export class KernelService {
10561060

10571061
const filePath = await Neutralino.filesystem.getJoinedPath(appDir, KERNELS_FILE);
10581062
await Neutralino.filesystem.writeFile(filePath, JSON.stringify(this.#installedKernels, null, 2));
1063+
this.installedKernelsVersion.update((v) => v + 1);
10591064
}
10601065
}

launcher/src/app/shared/proxy-input.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ import { ProxyParserService, type ParsedProxy } from './proxy-parser.service';
8282
8383
<mat-form-field>
8484
<mat-label>Password</mat-label>
85-
<input matInput formControlName="password" type="password" (input)="onFormChange()" />
85+
<input matInput formControlName="password" (input)="onFormChange()" />
8686
</mat-form-field>
8787
</form>
8888

0 commit comments

Comments
 (0)