mirror of
https://github.com/everoddandeven/monerod-gui.git
synced 2025-04-21 12:58:10 +00:00
Compare commits
16 commits
Author | SHA1 | Date | |
---|---|---|---|
|
f17bf47216 | ||
|
56ad4c2653 | ||
|
968be73ea1 | ||
|
41455d95e2 | ||
|
1787748282 | ||
|
15dfd21455 | ||
|
2a5bf12530 | ||
|
85b7d52587 | ||
|
975b0570ba | ||
|
be3100a72c | ||
|
ca1989f7b8 | ||
|
813b895911 | ||
|
cece1eb3fb | ||
|
904afa2583 | ||
|
4966e02710 | ||
|
756e90482a |
16 changed files with 622 additions and 605 deletions
.github/workflows
README.mdapp
electron-installer-debian.jsonelectron-installer-redhat.jsonpackage-lock.jsonpackage.jsonsrc/app
62
.github/workflows/darwin_dmg.yml
vendored
62
.github/workflows/darwin_dmg.yml
vendored
|
@ -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
|
||||
|
2
.github/workflows/lint.yml
vendored
2
.github/workflows/lint.yml
vendored
|
@ -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
|
||||
|
|
12
.github/workflows/linux.yml
vendored
12
.github/workflows/linux.yml
vendored
|
@ -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
|
||||
|
|
24
.github/workflows/macos.yml
vendored
24
.github/workflows/macos.yml
vendored
|
@ -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
|
||||
|
14
.github/workflows/release.yml
vendored
14
.github/workflows/release.yml
vendored
|
@ -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 }}
|
||||
|
||||
|
|
4
.github/workflows/windows.yml
vendored
4
.github/workflows/windows.yml
vendored
|
@ -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
|
||||
|
|
25
README.md
25
README.md
|
@ -9,7 +9,7 @@
|
|||
[](https://github.com/everoddandeven/monerod-gui/actions/workflows/lint.yml)
|
||||
|
||||
[](https://github.com/everoddandeven/monerod-gui/actions/workflows/linux.yml)
|
||||
[](https://github.com/everoddandeven/monerod-gui/actions/workflows/darwin_dmg.yml)
|
||||
[](https://github.com/everoddandeven/monerod-gui/actions/workflows/macos.yml)
|
||||
[](https://github.com/everoddandeven/monerod-gui/actions/workflows/windows.yml)
|
||||
|
||||
[![Watch on GitHub][github-watch-badge]][github-watch]
|
||||
|
@ -64,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`.
|
||||
|
@ -91,14 +95,16 @@ 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
|
||||
|
@ -131,6 +137,7 @@ https://github.com/user-attachments/assets/c4a50d2f-5bbb-48ac-9425-30ecc20ada7c
|
|||
- [ ] 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
12
app/package-lock.json
generated
|
@ -1,16 +1,16 @@
|
|||
{
|
||||
"name": "monerod-gui",
|
||||
"version": "1.2.0",
|
||||
"version": "1.3.0",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "monerod-gui",
|
||||
"version": "1.2.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",
|
||||
|
|
|
@ -6,13 +6,13 @@
|
|||
"name": "everoddandeven",
|
||||
"email": "everoddandeven@protonmail.com"
|
||||
},
|
||||
"version": "1.2.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",
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
"name": "monerod-gui",
|
||||
"productName": "Monero Daemon",
|
||||
"genericName": "Cryptocurrency Node Manager",
|
||||
"version": "1.2.0",
|
||||
"version": "1.3.0",
|
||||
"dest": "release/",
|
||||
"icon": "src/assets/icons/favicon.256x256.png",
|
||||
"categories": [
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
"name": "monerod-gui",
|
||||
"productName": "Monero Daemon",
|
||||
"genericName": "Cryptocurrency Node Manager",
|
||||
"version": "1.2.0",
|
||||
"version": "1.3.0",
|
||||
"dest": "dist/installers/",
|
||||
"icon": "src/assets/icons/favicon.256x256.png",
|
||||
"categories": [
|
||||
|
|
904
package-lock.json
generated
904
package-lock.json
generated
File diff suppressed because it is too large
Load diff
55
package.json
55
package.json
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "monerod-gui",
|
||||
"version": "1.2.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",
|
||||
|
|
|
@ -1324,7 +1324,7 @@ export class DaemonService {
|
|||
}
|
||||
|
||||
public getGuiVersion(): string {
|
||||
return "1.2.0-main";
|
||||
return "1.3.0-main";
|
||||
}
|
||||
|
||||
public async getProcessStats(): Promise<ProcessStats> {
|
||||
|
|
|
@ -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>
|
||||
<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
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue