Compare commits

...

18 commits

Author SHA1 Message Date
everoddandeven
f17bf47216 Fix anonymous inbound settings save 2025-03-23 13:38:42 +01:00
everoddandeven
56ad4c2653 Fix settings overflow y 2025-03-23 12:15:14 +01:00
everoddandeven
968be73ea1 Fix add node/peer 2025-03-23 12:00:34 +01:00
everoddandeven
41455d95e2 Fix anonymous inbound settings 2025-03-23 11:56:14 +01:00
everoddandeven
1787748282 Upgrade dependencies 2025-03-22 16:58:34 +01:00
everoddandeven
15dfd21455 Upgrade Angular to 19.2.4 2025-03-22 14:11:07 +01:00
everoddandeven
2a5bf12530 Temporaly disable mac os installer dmg build 2025-03-18 22:42:02 +01:00
everoddandeven
85b7d52587 Upgrade angular eslint 2025-03-18 22:40:51 +01:00
everoddandeven
975b0570ba Upgrade Angular to 19.2.3 2025-03-18 22:39:00 +01:00
everoddandeven
be3100a72c Upgrade dependencies 2025-03-18 21:04:00 +01:00
everoddandeven
ca1989f7b8 Upgrade electron to 35.0.2 2025-03-18 21:00:25 +01:00
everoddandeven
813b895911 Try fix CI 2025-03-09 16:29:23 +01:00
everoddandeven
cece1eb3fb Minor Fixes CI and update README 2025-03-09 15:04:37 +01:00
everoddandeven
904afa2583 Fix MacOS CI and badge 2025-03-09 14:39:28 +01:00
everoddandeven
4966e02710 Fix MacOS CI 2025-03-08 19:02:32 +01:00
everoddandeven
756e90482a Bump version to 1.3.0 2025-03-08 18:22:53 +01:00
everoddandeven
5e12053630 Bump version to 1.2.0 2025-03-08 18:20:45 +01:00
Sidney
70f7579043
Update README.md 2025-03-08 18:17:34 +01:00
16 changed files with 631 additions and 615 deletions

View file

@ -1,62 +0,0 @@
# This is a basic workflow to help you get started with Actions
name: 'MacOS - x64 DMG Build'
# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches:
- main
pull_request:
branches:
- main
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
permissions:
contents: read
jobs:
build:
strategy:
matrix:
node-version: [20]
# The type of runner that the job will run on
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Cache node modules
uses: actions/cache@v4
env:
cache-name: cache-node-modules
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Install Dependencies
run: brew install python-setuptools && npm install -g appdmg && npm i && npm i -D cli-truncate iconv-corefoundation
- name: Build the app
run: npm run electron:build:mac
- name: Upload DMG artifact
uses: actions/upload-artifact@v4
with:
name: monerod-gui-darwin-installer-dmg
path: dist/installers/*.dmg

View file

@ -19,7 +19,7 @@ jobs:
build:
strategy:
matrix:
node-version: [20]
node-version: [22]
# The type of runner that the job will run on
runs-on: ubuntu-24.04

View file

@ -1,5 +1,5 @@
# This is a basic workflow to help you get started with Actions
name: 'Linux'
name: 'Linux Build'
# Controls when the action will run.
on:
@ -45,13 +45,11 @@ jobs:
with:
node-version: ${{ matrix.node-version }}
- name: Install linux dependencies
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-dev webkit2gtk-4.0 libappindicator3-dev librsvg2-dev patchelf fakeroot dpkg
- name: Install Dependencies
run: npm i
sudo apt-get install -y libgtk-3-dev webkit2gtk-4.0 libappindicator3-dev librsvg2-dev patchelf fakeroot dpkg
npm i
- name: Build DEB package
run: npm run electron:build:deb
@ -77,5 +75,5 @@ jobs:
- name: Upload RPM artifact
uses: actions/upload-artifact@v4
with:
name: monerod-gui-redhat-x86_64-installer
name: monerod-gui-linux-installer-rpm
path: dist/installers/*.rpm

View file

@ -22,7 +22,7 @@ jobs:
build:
strategy:
matrix:
node-version: [20]
node-version: [22]
# The type of runner that the job will run on
runs-on: macos-13
@ -47,11 +47,11 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
run: brew install python-setuptools && npm install -g appdmg && npm i && npm i -D cli-truncate iconv-corefoundation
- name: Install Dependencies
run: npm i && npm i -D cli-truncate iconv-corefoundation
- name: Build the app
- name: Build DMG and PKG
run: npm run electron:build
- name: List artifacts
@ -60,11 +60,21 @@ jobs:
- name: Upload DMG artifact
uses: actions/upload-artifact@v4
with:
name: monerod-gui-darwin12-dmg
name: monerod-gui-darwin-dmg
path: release/*.dmg
- name: Upload PKG artifact
uses: actions/upload-artifact@v4
with:
name: monerod-gui-darwin12-pkg
name: monerod-gui-darwin-pkg
path: release/*.pkg
# - name: Build DMG installer
# run: npm run electron:build:mac
# - name: Upload DMG installer artifact
# uses: actions/upload-artifact@v4
# with:
# name: monerod-gui-darwin-installer-dmg
# path: dist/installers/*.dmg

View file

@ -1,4 +1,4 @@
name: Build & Release Electron-Angular
name: Release
on:
release:
@ -42,8 +42,8 @@ jobs:
uses: softprops/action-gh-release@v2
with:
files: |
release/*.exe#monerod-gui-windows-${{ github.ref_name }}.exe
release/*.msi#monerod-gui-windows-${{ github.ref_name }}.msi
release/*.exe#monerod-gui-windows-${{ github.ref_name }}-portable.exe
release/*.msi#monerod-gui-windows-${{ github.ref_name }}-installer.msi
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@ -75,20 +75,24 @@ jobs:
node-version: ${{ matrix.node-version }}
- name: Install Dependencies
run: npm i && npm i -D cli-truncate iconv-corefoundation
run: brew install python-setuptools && npm install -g appdmg && npm i && npm i -D cli-truncate iconv-corefoundation
- name: Build the app
run: npm run electron:build
- name: List artifacts
run: ls release/
- name: Build DMG installer
run: npm run electron:build:mac
- name: Upload artifacts
uses: softprops/action-gh-release@v2
with:
files: |
release/*.dmg#monerod-gui-darwin-${{ github.ref_name }}.dmg
release/*.pkg#monerod-gui-darwin-${{ github.ref_name }}.pkg
dist/installers/*.dmg#monerod-gui-darwin-${{ github.ref_name }}-installer.dmg
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View file

@ -22,7 +22,7 @@ jobs:
build:
strategy:
matrix:
node-version: [20]
node-version: [22]
# The type of runner that the job will run on
runs-on: windows-2022
@ -51,7 +51,7 @@ jobs:
- name: Install Dependencies
run: npm i
- name: Build the app
- name: Build portable and installer packages
run: npm run electron:build
- name: Upload EXE artifact

View file

@ -8,11 +8,8 @@
[![License][license-badge]](LICENSE.md)
[![Lint Test](https://github.com/everoddandeven/monerod-gui/actions/workflows/lint.yml/badge.svg)](https://github.com/everoddandeven/monerod-gui/actions/workflows/lint.yml)
[![Linux - AppImage Build](https://github.com/everoddandeven/monerod-gui/actions/workflows/linux_appimage.yml/badge.svg)](https://github.com/everoddandeven/monerod-gui/actions/workflows/linux_appimage.yml)
[![Linux - x64 DEB Build](https://github.com/everoddandeven/monerod-gui/actions/workflows/linux_x64_deb.yml/badge.svg)](https://github.com/everoddandeven/monerod-gui/actions/workflows/linux_x64_deb.yml)
[![Linux - x86_64 RPM Build](https://github.com/everoddandeven/monerod-gui/actions/workflows/linux_rpm.yml/badge.svg)](https://github.com/everoddandeven/monerod-gui/actions/workflows/linux_rpm.yml)
[![MacOS - x64 DMG Build](https://github.com/everoddandeven/monerod-gui/actions/workflows/darwin_dmg.yml/badge.svg)](https://github.com/everoddandeven/monerod-gui/actions/workflows/darwin_dmg.yml)
[![Linux](https://github.com/everoddandeven/monerod-gui/actions/workflows/linux.yml/badge.svg)](https://github.com/everoddandeven/monerod-gui/actions/workflows/linux.yml)
[![MacOS Build](https://github.com/everoddandeven/monerod-gui/actions/workflows/macos.yml/badge.svg)](https://github.com/everoddandeven/monerod-gui/actions/workflows/macos.yml)
[![Windows Build](https://github.com/everoddandeven/monerod-gui/actions/workflows/windows.yml/badge.svg)](https://github.com/everoddandeven/monerod-gui/actions/workflows/windows.yml)
[![Watch on GitHub][github-watch-badge]][github-watch]
@ -67,6 +64,10 @@ https://github.com/user-attachments/assets/c4a50d2f-5bbb-48ac-9425-30ecc20ada7c
- Users can choose the installation directory for `monerod`, allowing for greater flexibility in managing the software on different systems.
### 8. Anonymous Network Support
- It is possible to start a `TOR` and/or `I2P` service through the node settings. This allows the user to synchronize, relay txs, and make their node available under an anonymous network in a simple and immediate way, just a few clicks.
### Usage
1. On the first run, Monerod GUI will detect your operating system and prompt you to download the appropriate version of `monerod`.
@ -81,7 +82,7 @@ https://github.com/user-attachments/assets/c4a50d2f-5bbb-48ac-9425-30ecc20ada7c
- [X] Detect wired/Wi-Fi connection
- [X] Detect battery/ac power
- [ ] Detect preinstalled `monerod`
- [ ] Linux
- [X] Linux
- [ ] Windows
- [ ] MacOs
- [ ] Detect already running `monerod` instance
@ -94,21 +95,23 @@ https://github.com/user-attachments/assets/c4a50d2f-5bbb-48ac-9425-30ecc20ada7c
- [X] Windows
- [X] MacOS
- [ ] Packages
- [X] deb
- [X] rpm
- [X] exe
- [X] msi
- [X] dmg
- [ ] pkg
- [ ] flatpack
- [ ] snap
- [X] Linux DEB
- [X] Linux RPM
- [X] Linux AppImage
- [ ] Linux Flatpack
- [ ] Linux Snap
- [X] Windows Portable EXE
- [X] Windows Installer MSI
- [X] MacOS DMG
- [X] MacOS PKG
- [X] MacOS DMG Installer
- [X] Import/export `monerod.conf` node configuration
- [X] Synchronization in a specific time slot
- [ ] Prompt user access control for administration operation
- [ ] Check for new versions of the GUI
- [ ] Wallet RPC management
- [ ] Blockchain tools
- [ ] Private testnet
- [X] Private testnet
- [ ] Import blockchain
- [ ] Export blockchain
- [ ] Prune blockchain
@ -123,15 +126,18 @@ https://github.com/user-attachments/assets/c4a50d2f-5bbb-48ac-9425-30ecc20ada7c
- [ ] P2Pool integration
- [ ] Network tools
- [ ] Generate SSL certificate
- [ ] Tor integration
- [ ] I2P integration
- [ ] Automatic malicious node detection
- [X] Tor integration
- [X] I2P integration
- [ ] Remote node management
- [ ] No CORS connection
- [ ] SSH connection
- [ ] Move to Tauri
- [ ] Port and upgrade `battery-level` dependency
- [X] Port and upgrade `battery-level` dependency
- [ ] Make this project also deployable in a web server
- [ ] Option to download/use `cuprated` instead of `monerod`
- [ ] Restricted RPC GUI mode
- [ ] Light Wallet Server integration
- [ ] Detect Whonix and use system proxy
## Getting Started

12
app/package-lock.json generated
View file

@ -1,16 +1,16 @@
{
"name": "monerod-gui",
"version": "1.1.0",
"version": "1.3.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "monerod-gui",
"version": "1.1.0",
"version": "1.3.0",
"dependencies": {
"adm-zip": "^0.5.16",
"applescript": "^1.0.0",
"axios": "^1.8.2",
"axios": "^1.8.4",
"network": "^0.7.0",
"node-battery-ts": "^1.0.0",
"os": "^0.1.2",
@ -188,9 +188,9 @@
"integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q=="
},
"node_modules/axios": {
"version": "1.8.2",
"resolved": "https://registry.npmjs.org/axios/-/axios-1.8.2.tgz",
"integrity": "sha512-ls4GYBm5aig9vWx8AWDSGLpnpDQRtWAfrjU+EuytuODrFBkqesN2RkOQCBzrA1RQNHw1SmRMSDDDSwzNAYQ6Rg==",
"version": "1.8.4",
"resolved": "https://registry.npmjs.org/axios/-/axios-1.8.4.tgz",
"integrity": "sha512-eBSYY4Y68NNlHbHBMdeDmKNtDgXWhQsJcGqzO3iLUM0GraQFSS9cVgPX5I9b3lbdFKyYoAEGAZF1DwhTaljNAw==",
"dependencies": {
"follow-redirects": "^1.15.6",
"form-data": "^4.0.0",

View file

@ -6,13 +6,13 @@
"name": "everoddandeven",
"email": "everoddandeven@protonmail.com"
},
"version": "1.1.0",
"version": "1.3.0",
"main": "main.js",
"private": true,
"dependencies": {
"adm-zip": "^0.5.16",
"applescript": "^1.0.0",
"axios": "^1.8.2",
"axios": "^1.8.4",
"network": "^0.7.0",
"node-battery-ts": "^1.0.0",
"os": "^0.1.2",

View file

@ -2,7 +2,7 @@
"name": "monerod-gui",
"productName": "Monero Daemon",
"genericName": "Cryptocurrency Node Manager",
"version": "1.1.0",
"version": "1.3.0",
"dest": "release/",
"icon": "src/assets/icons/favicon.256x256.png",
"categories": [

View file

@ -2,7 +2,7 @@
"name": "monerod-gui",
"productName": "Monero Daemon",
"genericName": "Cryptocurrency Node Manager",
"version": "1.1.0",
"version": "1.3.0",
"dest": "dist/installers/",
"icon": "src/assets/icons/favicon.256x256.png",
"categories": [

904
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -1,6 +1,6 @@
{
"name": "monerod-gui",
"version": "1.1.0",
"version": "1.3.0",
"description": "Monero daemon GUI",
"icon": "./assets/icons/favicon.ico",
"homepage": "https://github.com/everoddandeven/monerod-gui#readme",
@ -81,14 +81,14 @@
"lint": "ng lint"
},
"dependencies": {
"@angular/common": "19.2.1",
"@angular/compiler": "19.2.1",
"@angular/core": "19.2.1",
"@angular/forms": "19.2.1",
"@angular/language-service": "19.2.1",
"@angular/platform-browser": "19.2.1",
"@angular/platform-browser-dynamic": "19.2.1",
"@angular/router": "19.2.1",
"@angular/common": "19.2.3",
"@angular/compiler": "19.2.3",
"@angular/core": "19.2.3",
"@angular/forms": "19.2.3",
"@angular/language-service": "19.2.3",
"@angular/platform-browser": "19.2.3",
"@angular/platform-browser-dynamic": "19.2.3",
"@angular/router": "19.2.3",
"@popperjs/core": "2.11.8",
"bootstrap": "5.3.3",
"bootstrap-icons": "1.11.3",
@ -106,48 +106,49 @@
"devDependencies": {
"@angular-builders/custom-webpack": "19.0.0",
"@angular-builders/jest": "19.0.0",
"@angular-eslint/builder": "19.2.0",
"@angular-eslint/eslint-plugin": "19.2.0",
"@angular-eslint/eslint-plugin-template": "19.2.0",
"@angular-eslint/schematics": "19.2.0",
"@angular-eslint/template-parser": "19.2.0",
"@angular/build": "^19.2.1",
"@angular/cli": "19.2.1",
"@angular/compiler-cli": "19.2.1",
"@angular-eslint/builder": "19.3.0",
"@angular-eslint/eslint-plugin": "19.3.0",
"@angular-eslint/eslint-plugin-template": "19.3.0",
"@angular-eslint/schematics": "19.3.0",
"@angular-eslint/template-parser": "19.3.0",
"@angular/build": "^19.2.4",
"@angular/cli": "19.2.4",
"@angular/compiler-cli": "19.2.3",
"@electron/packager": "18.3.6",
"@ngx-translate/core": "16.0.4",
"@ngx-translate/http-loader": "16.0.1",
"@playwright/test": "1.51.0",
"@playwright/test": "1.51.1",
"@types/auto-launch": "5.0.5",
"@types/bootstrap": "5.2.10",
"@types/chart.js": "2.9.41",
"@types/jest": "29.5.14",
"@types/jquery": "3.5.32",
"@types/node": "22.13.10",
"@types/node": "22.13.11",
"@types/pidusage": "2.0.5",
"@types/unbzip2-stream": "1.4.3",
"@typescript-eslint/eslint-plugin": "8.26.0",
"@typescript-eslint/parser": "8.26.0",
"axios": "1.8.2",
"@typescript-eslint/eslint-plugin": "8.27.0",
"@typescript-eslint/parser": "8.27.0",
"axios": "1.8.4",
"conventional-changelog-cli": "5.0.0",
"electron": "35.0.0",
"electron": "35.0.3",
"electron-builder": "25.1.8",
"electron-debug": "4.1.0",
"electron-reloader": "1.2.3",
"eslint": "9.22.0",
"eslint": "9.23.0",
"eslint-plugin-import": "2.31.0",
"eslint-plugin-jsdoc": "50.6.3",
"eslint-plugin-jsdoc": "50.6.8",
"eslint-plugin-prefer-arrow": "1.2.3",
"jest": "29.7.0",
"node-polyfill-webpack-plugin": "4.1.0",
"npm-run-all": "4.1.5",
"playwright": "1.51.0",
"playwright": "1.51.1",
"ts-node": "10.9.2",
"typescript": "5.8.2",
"wait-on": "8.0.2",
"wait-on": "8.0.3",
"webdriver-manager": "12.1.9"
},
"optionalDependencies": {
"appdmg": "0.6.6",
"electron-installer-debian": "3.2.0",
"electron-installer-dmg": "5.0.1",
"electron-installer-redhat": "3.4.0",

View file

@ -1324,7 +1324,7 @@ export class DaemonService {
}
public getGuiVersion(): string {
return "1.1.0-main";
return "1.3.0-main";
}
public async getProcessStats(): Promise<ProcessStats> {

View file

@ -13,7 +13,7 @@
</div>
</div>
<div *ngIf="!loading" class="tab-content tab-grow" id="pills-tabContent">
<div [hidden]="loading" class="tab-content tab-grow" id="pills-tabContent">
<div *ngIf="savingChangesError !== ''" class="alert alert-danger d-flex align-items-center justify-content-center text-center" role="alert">
<h4><i class="bi bi-exclamation-triangle m-2"></i></h4>&nbsp;&nbsp;
<div>
@ -567,7 +567,7 @@
<hr class="my-4">
<h4 class="mb-3">Peers</h4>
<h4 class="mb-3">Limit Peers</h4>
<div class="col-md-6">
<label for="in-peers" class="form-label">In Peers</label>
@ -1173,7 +1173,7 @@
<div class="col-10">
<label for="tor-anonymous-inbound-address" class="form-label">Inbound Address</label>
<input (input)="onTorAnonymousInboundChange()" [disabled]="!canEditNodeSettings|| currentTorSettings.enabled" type="text" class="form-control" id="tor-anonymous-inbound-address" placeholder="...sxakefmed.onion" [(ngModel)]="torAnonymousInboundAddress" [ngModelOptions]="{standalone: true}">
<input (input)="onTorAnonymousInboundChange()" [disabled]="!canEditNodeSettings|| currentTorSettings.enabled" type="text" class="form-control" id="tor-anonymous-inbound-address" placeholder="yourlongonionaddress.onion" [(ngModel)]="torAnonymousInboundAddress" [ngModelOptions]="{standalone: true}">
<small class="text-body-secondary">
Specify inbound hidden service address for receiving incoming TOR connections
</small>
@ -1313,23 +1313,16 @@
<div *ngIf="!currentI2pdSettings.enabled" class="row g-3">
<h4 class="mb-3">I2P Anonymous Inbound</h4>
<div class="col-10">
<div class="col-12">
<label for="i2p-anonymous-inbound-address" class="form-label">Inbound Address</label>
<input (input)="onI2pAnonymousInboundChange()" [disabled]="!canEditNodeSettings || currentI2pdSettings.enabled" type="text" class="form-control" id="i2p-anonymous-inbound-address" placeholder="...sxakefmed.i2p" [(ngModel)]="i2pAnonymousInboundAddress" [ngModelOptions]="{standalone: true}">
<small class="text-body-secondary">
Specify inbound hidden service address for receiving incoming I2P connections
</small>
</div>
<div class="col-md-2">
<label for="i2p-anonymous-inbound-port" class="form-label">Inbound port</label>
<input (change)="onI2pAnonymousInboundChange()" [disabled]="!canEditNodeSettings || currentI2pdSettings.enabled" type="number" min="0" class="form-control" id="i2p-anonymous-inbound-port" placeholder="28083" [(ngModel)]="i2pAnonymousInboundPort" [ngModelOptions]="{standalone: true}">
<small class="text-body-secondary">
</small>
</div>
<div class="col-8">
<label for="i2p-anonymous-inbound-forward-ip" class="form-label">Forward Ip</label>
<label for="i2p-anonymous-inbound-forward-ip" class="form-label">Forward IP</label>
<input (input)="onI2pAnonymousInboundChange()" [disabled]="!canEditNodeSettings || currentI2pdSettings.enabled" type="text" class="form-control" id="i2p-anonymous-inbound-forward-ip" placeholder="127.0.0.1" [(ngModel)]="i2pAnonymousInboundForwardIp" [ngModelOptions]="{standalone: true}">
<small class="text-body-secondary">
Forward node ip

View file

@ -1,4 +1,4 @@
import { AfterViewInit, Component, NgZone } from '@angular/core';
import { Component, NgZone } from '@angular/core';
import { NavbarLink } from '../../shared/components/navbar/navbar.model';
import { DaemonSettings, DefaultPrivnetNode2Settings, I2pDaemonSettings, PrivnetDaemonSettings, TorDaemonSettings } from '../../../common';
import { DaemonService, I2pDaemonService, ElectronService, TorDaemonService } from '../../core/services';
@ -12,7 +12,7 @@ import { NavbarService } from '../../shared/components';
styleUrl: './settings.component.scss',
standalone: false
})
export class SettingsComponent extends BasePageComponent implements AfterViewInit {
export class SettingsComponent extends BasePageComponent {
// #region Properties
public readonly navbarLinks: NavbarLink[];
@ -160,7 +160,7 @@ export class SettingsComponent extends BasePageComponent implements AfterViewIni
public i2pAnonymousInboundMaxConnections: number = 0;
public get i2pAnonymousInbound(): string {
const i2pAnonymousInbound = `${this.i2pAnonymousInboundAddress}:${this.i2pAnonymousInboundPort},${this.i2pAnonymousInboundForwardIp}:${this.i2pAnonymousInboundForwardPort}${this.i2pTxProxyMaxConnections > -1 ? ',' + this.i2pAnonymousInboundMaxConnections : ''}`;
const i2pAnonymousInbound = `${this.i2pAnonymousInboundAddress},${this.i2pAnonymousInboundForwardIp}:${this.i2pAnonymousInboundForwardPort}${this.i2pTxProxyMaxConnections > -1 ? ',' + this.i2pAnonymousInboundMaxConnections : ''}`;
if (!DaemonSettings.isValidI2pAnonymousInbound(i2pAnonymousInbound)) return '';
return i2pAnonymousInbound;
@ -270,7 +270,7 @@ export class SettingsComponent extends BasePageComponent implements AfterViewIni
return false;
}
if (this.exclusiveNodePort <= 0) {
if (this.exclusiveNodePort < 0) {
return false;
}
@ -290,7 +290,7 @@ export class SettingsComponent extends BasePageComponent implements AfterViewIni
return false;
}
if (this.peerPort <= 0) {
if (this.peerPort < 0) {
return false;
}
@ -335,7 +335,7 @@ export class SettingsComponent extends BasePageComponent implements AfterViewIni
return false;
}
if (this.priorityNodePort <= 0) {
if (this.priorityNodePort < 0) {
return false;
}
@ -412,12 +412,6 @@ export class SettingsComponent extends BasePageComponent implements AfterViewIni
this._currentI2pdSettings = this.originalI2pdSettings.clone();
this.originalTorSettings = this.torService.settings;
this._currentTorSettings = this.originalTorSettings.clone();
this.load().then(() => {
console.debug("Settings loaded");
}).catch((error: any) => {
console.error(error);
});
}
public onTorTxProxyChange(): void {
@ -437,16 +431,12 @@ export class SettingsComponent extends BasePageComponent implements AfterViewIni
}
public onTorAnonymousInboundChange(): void {
if (this.torAnonymousInbound == '') return;
const torAnonymousInbound = this.torAnonymousInbound;
this._currentSettings.setAnonymousInbound(torAnonymousInbound, 'tor');
}
public onI2pAnonymousInboundChange(): void {
if (this.i2pAnonymousInbound == '') return;
const i2pAnonymousInbound = this.i2pAnonymousInbound;
this._currentSettings.setAnonymousInbound(i2pAnonymousInbound, 'i2p');
@ -464,19 +454,17 @@ export class SettingsComponent extends BasePageComponent implements AfterViewIni
return;
}
const components = i2pProxy.replace(`i2p,`, '').split(',');
const address = components[0];
const port = components[1];
const socks = components[2];
const socksComponent = socks.split(':');
const socksIp = socksComponent[0];
const socksPort = socksComponent[1];
const maxConnections = components[3];
const components = i2pProxy.split(',');
const i2pAddress = components[0];
const inboundAddress = components[1];
const maxConnections = components[2];
const c = inboundAddress.split(':');
const forwardHost = c[0];
const forwardPort = c[1];
this.i2pAnonymousInboundAddress = address;
this.i2pAnonymousInboundPort = parseInt(port);
this.i2pAnonymousInboundForwardIp = socksIp;
this.i2pAnonymousInboundForwardPort = parseInt(socksPort);
this.i2pAnonymousInboundAddress = i2pAddress;
this.i2pAnonymousInboundForwardIp = forwardHost;
this.i2pAnonymousInboundForwardPort = parseInt(forwardPort);
if (maxConnections) {
this.i2pAnonymousInboundMaxConnections = parseInt(maxConnections);
@ -511,9 +499,9 @@ export class SettingsComponent extends BasePageComponent implements AfterViewIni
}
private refreshTorAnonymousInbound(): void {
const torProxy = this._currentSettings.anonymousInbounds.tor;
const anonInbound = this._currentSettings.anonymousInbounds.tor;
if (!DaemonSettings.isValidTorAnonymousInbound(torProxy)) {
if (!DaemonSettings.isValidTorAnonymousInbound(anonInbound)) {
this.torAnonymousInboundAddress = '';
this.torAnonymousInboundPort = 0;
this.torAnonymousInboundForwardIp = '';
@ -522,19 +510,21 @@ export class SettingsComponent extends BasePageComponent implements AfterViewIni
return;
}
const components = torProxy.replace(`tor,`, '').split(',');
const address = components[0];
const port = components[1];
const socks = components[2];
const socksComponent = socks.split(':');
const socksIp = socksComponent[0];
const socksPort = socksComponent[1];
const maxConnections = components[3];
const components = anonInbound.split(',');
const addressAndPort = components[0];
const forwardAddress = components[1];
const maxConnections = components[2];
const c = forwardAddress.split(':');
const forwardHost = c[0];
const forwardPort = c[1];
const v = addressAndPort.split(':');
const onion = v[0];
const onionPort = v[1];
this.torAnonymousInboundAddress = address;
this.torAnonymousInboundPort = parseInt(port);
this.torAnonymousInboundForwardIp = socksIp;
this.torAnonymousInboundForwardPort = parseInt(socksPort);
this.torAnonymousInboundAddress = onion;
this.torAnonymousInboundPort = parseInt(onionPort);
this.torAnonymousInboundForwardIp = forwardHost;
this.torAnonymousInboundForwardPort = parseInt(forwardPort);
if (maxConnections) {
this.torAnonymousInboundMaxConnections = parseInt(maxConnections);
@ -581,8 +571,14 @@ export class SettingsComponent extends BasePageComponent implements AfterViewIni
}
}
public ngAfterViewInit(): void {
this.loadTables();
public override ngAfterContentInit(): void {
super.ngAfterContentInit();
this.load().then(() => {
console.debug("Settings loaded");
this.loadTables();
}).catch((error: any) => {
console.error(error);
});
}
public refreshSyncMode(): void {
@ -671,7 +667,7 @@ export class SettingsComponent extends BasePageComponent implements AfterViewIni
this.refreshTorTxProxy();
this.refreshI2pAnonymousInbound();
this.refreshI2pTxProxy();
this.updateTablesContentHeight();
setTimeout(() => this.updateTablesContentHeight(), 100);
}
private loadTables(): void {