[-]
[+]
|
Changed |
_service:tar_git:i2pd.spec
|
|
[-]
[+]
|
Changed |
_service
^
|
@@ -2,7 +2,7 @@
<service name="tar_git">
<param name="url">https://github.com/nephros/i2pd</param>
<param name="branch"></param>
- <param name="revision">2.50.2+git2</param>
+ <param name="revision">2.50.2+git3</param>
<!--
<param name="branch">next</param>
<param name="branch">master</param>
|
[-]
[+]
|
Changed |
_service:tar_git:i2pd-2.50.2+git3.tar.gz/ui/jolla-settings/pages/i2p/EnableSwitch.qml
^
|
@@ -1,9 +1,6 @@
-/*
- * Copyright (c) 2022 Peter G. <sailfish@nephros.org>
- *
- * License: Apache-2.0
- *
- */
+// SPDX-FileCopyrightText: 2022 Peter G. <sailfish@nephros.org>
+//
+// SPDX-License-Identifier: Apache-2.0
import QtQuick 2.1
import Sailfish.Silica 1.0
@@ -14,15 +11,20 @@
SettingsToggle {
id: enableSwitch
- property bool activeState
+ property alias serviceState: unit.activeState
+ property bool activeState: serviceState === "active"
+ property bool inactiveState: !activeState && ((serviceState !== "inactive") && (serviceState !== "failed"))
+ property bool busyState: !activeState && ((serviceState !== "reloading") && (serviceState !== "activating") && (serviceState !== "deactivating"))
+
+ active: activeState
+ checked: activeState
+ busy: busyState
+ enabled: !busy
name: "I2P"
activeText: "I2P"
icon.source: "image://theme/icon-m-i2p"
- active: activeState
- checked: activeState
-
menu: ContextMenu {
SettingsMenuItem { onClicked: enableSwitch.goToSettings() }
MenuItem {
@@ -31,81 +33,20 @@
}
}
- onToggled: {
- if (busy) {
- return
- }
- busy = true
- systemdServiceIface.call(activeState ? "Stop" : "Start", ["replace"])
- systemdServiceIface.updateProperties()
- }
-
- Timer {
- id: checkState
- interval: 2000
- repeat: true
- onTriggered: {
- systemdServiceIface.updateProperties()
- }
- }
+ onToggled: unit.call(activeState ? "Stop" : "Start", ["replace"])
DBusInterface {
- id: systemdServiceIface
+ id: unit
bus: DBus.SystemBus
service: 'org.freedesktop.systemd1'
path: '/org/freedesktop/systemd1/unit/i2pd_2eservice'
iface: 'org.freedesktop.systemd1.Unit'
- signalsEnabled: true
- function updateProperties() {
- var activeProperty = systemdServiceIface.getProperty("ActiveState")
- console.log("ActiveState:", activeProperty)
- if (activeProperty === "active") {
- activeState = true
- checkState.stop()
- }
- else if (activeProperty === "inactive" || activeProperty === "failed") {
- activeState = false
- checkState.stop()
- }
- else {
- enableSwitch.busy = false
- checkState.start()
- }
- }
-
- onPropertiesChanged: updateProperties()
- Component.onCompleted: updateProperties()
- }
-
- DBusInterface {
- bus: DBus.SystemBus
- service: 'org.freedesktop.systemd1'
- path: '/org/freedesktop/systemd1/unit/i2pd'
- iface: 'org.freedesktop.DBus.Properties'
-
- signalsEnabled: true
- onPropertiesChanged: systemdServiceIface.updateProperties()
- Component.onCompleted: systemdServiceIface.updateProperties()
- }
+ property string activeState
+ //property string subState
+ //property string unitFileState
- /*
- DBusInterface {
- bus: DBus.SystemBus
- service: "org.freedesktop.systemd1"
- path: "/org/freedesktop/systemd1"
- iface: "org.freedesktop.systemd1.Manager"
signalsEnabled: true
-
- signal unitNew(string name)
- onUnitNew: {
- if (name == "i2pd.service") {
- systemdServiceIface.updateProperties()
- }
- }
+ propertiesEnabled: true
}
- */
-
- Component.onCompleted: systemdServiceIface.updateProperties()
-
}
|
[-]
[+]
|
Changed |
_service:tar_git:i2pd-2.50.2+git3.tar.gz/ui/jolla-settings/pages/i2p/mainpage.qml
^
|
@@ -1,3 +1,7 @@
+// SPDX-FileCopyrightText: 2022-2024 Peter G. <sailfish@nephros.org>
+//
+// SPDX-License-Identifier: Apache-2.0
+
import QtQuick 2.1
import Sailfish.Silica 1.0
import com.jolla.settings 1.0
@@ -7,28 +11,24 @@
Page {
id: page
- property bool activeState
- //property bool enabledState
+ property alias serviceState: unit.activeState
+ property bool activeState: serviceState === "active"
+ property bool inactiveState: !activeState && ((serviceState !== "inactive") && (serviceState !== "failed"))
+ property bool busyState: !activeState && ((serviceState !== "reloading") && (serviceState !== "activating") && (serviceState !== "deactivating"))
+
+ property bool enabledState: ((unit.unitFileState === "enabled-runtime") || (unit.unitFileState === "enabled"))
+ property bool disabledState: (unit.unitFileState === "disabled")
+
onActiveStateChanged: {
if (activeState) { daemonInfo.refreshInfo() }
}
Timer {
- id: checkState
- interval: 2000
- repeat: true
- running: Qt.application.state == Qt.ApplicationActive
- onTriggered: {
- systemdServiceIface.updateProperties()
- }
- }
-
- Timer {
id: refreshTimer
interval: 15000
repeat: true
triggeredOnStart: true
- running: activeState && Qt.application.state == Qt.ApplicationActive
+ running: activeState && (Qt.application.state == Qt.ApplicationActive)
onTriggered: {
daemonInfo.refreshInfo()
}
@@ -36,71 +36,34 @@
DBusInterface {
// qdbus --system org.freedesktop.systemd1 /org/freedesktop/systemd1/unit/i2pd_2eservice org.freedesktop.systemd1.Unit.ActiveState
- // valuse: "active", "reloading", "inactive", "failed", "activating", and "deactivating"
- id: systemdServiceIface
+ // values: "active", "reloading", "inactive", "failed", "activating", and "deactivating"
+ id: unit
bus: DBus.SystemBus
service: 'org.freedesktop.systemd1'
path: '/org/freedesktop/systemd1/unit/i2pd_2eservice'
iface: 'org.freedesktop.systemd1.Unit'
- signalsEnabled: true
- function updateProperties() {
- var activeProperty = systemdServiceIface.getProperty("ActiveState")
- //var enabledProperty = systemdServiceIface.getProperty("UnitFileState")
- console.debug("ActiveState:", activeProperty)
- if (activeProperty === "active") {
- activeState = true
- startstopSwitch.busy = false
- }
- else if (activeProperty === "inactive" || activeProperty === "failed") {
- activeState = false
- startstopSwitch.busy = false
- } else {
- startstopSwitch.busy = true
- }
- /*
- if (enabledProperty === "enabled") {
- enabledState = true
- } else {
- enabledState = false
- }
- */
- }
+ property string activeState
+ //property string subState
+ property string unitFileState
- onPropertiesChanged: updateProperties()
- Component.onCompleted: updateProperties()
+ signalsEnabled: true
+ propertiesEnabled: true
}
DBusInterface {
+ // qdbus --system org.freedesktop.systemd1 /org/freedesktop/systemd1/unit/i2pd_2eservice org.freedesktop.systemd1.Unit.ActiveState
+ // values: "active", "reloading", "inactive", "failed", "activating", and "deactivating"
+ id: manager
bus: DBus.SystemBus
service: 'org.freedesktop.systemd1'
path: '/org/freedesktop/systemd1/unit/i2pd_2eservice'
- iface: 'org.freedesktop.DBus.Properties'
+ iface: 'org.freedesktop.systemd1.Manager'
signalsEnabled: true
- onPropertiesChanged: { console.log("updating properties"); systemdServiceIface.updateProperties()}
- Component.onCompleted: systemdServiceIface.updateProperties()
+ propertiesEnabled: true
}
- /*
- DBusInterface {
- id: systemdManagerIface
- bus: DBus.SystemBus
- service: "org.freedesktop.systemd1"
- path: "/org/freedesktop/systemd1"
- iface: "org.freedesktop.systemd1.Manager"
- signalsEnabled: true
-
- signal unitNew(string name)
- onUnitNew: {
- if (name == "i2pd.service") {
- console.debug("A wild unit appeared!", name);
- systemdServiceIface.updateProperties()
- }
- }
- }
- */
-
Component { id: passdialog
Dialog {
property string user
@@ -155,15 +118,13 @@
anchors.fill: parent
contentHeight: column.height
- Column {
- id: column
+ Column { id: column
width: page.width
spacing: Theme.paddingMedium
PageHeader {
title: qsTr("I2P")
- Image {
- id: banner
+ Image { id: banner
anchors.centerIn: parent
height: parent.height
sourceSize.height: height
@@ -173,8 +134,7 @@
}
}
- ListItem {
- id: enableItem
+ ListItem { id: enableItem
contentHeight: startstopSwitch.height
_backgroundColor: "transparent"
@@ -184,47 +144,39 @@
showMenuOnPressAndHold: false
menu: Component { FavoriteMenu { } }
- TextSwitch {
- id: startstopSwitch
+ TextSwitch { id: startstopSwitch
automaticCheck: false
checked: activeState
- text: "I2P Service" + " " + ( activeState ? "active" : "inactive" )
+ busy: inactiveState
+ enabled: !busy
+
+ text: "I2P Service" + " " + unit.activeState
description: activeState ? qsTr("Stopping may take some time.") : ""
- onClicked: {
- if (startstopSwitch.busy) {
- return
- }
- systemdServiceIface.call(activeState ? "Stop" : "Start", ["replace"])
- systemdServiceIface.updateProperties()
- startstopSwitch.busy = true
- }
+ onClicked: unit.call(activeState ? "Stop" : "Start", ["replace"])
}
}
- /*
TextSwitch {
- id: enableSwitch
+ id: enableSwitch
- automaticCheck: false
- checked: enabledState
- text: "Start at boot"
- onClicked: {
- enabledState ?
- systemdManagerIface.typedCall("DisableUnitFiles", [
- { "type": "as", "value": [ "i2pd.service" ]}, // array of service names
- { "type": "b", "value": "false"} // session only?
- ])
|
[-]
[+]
|
Changed |
_service:tar_git:i2pd.conf
^
|
@@ -1,115 +1,251 @@
+## Configuration file for a typical i2pd user
+## See https://i2pd.readthedocs.io/en/latest/user-guide/configuration/
+## for more options you can use in this file.
+
+## Lines that begin with "## " try to explain what's going on. Lines
+## that begin with just "#" are disabled commands: you can enable them
+## by removing the "#" symbol.
+
+## Tunnels config file
+## Default: ~/.i2pd/tunnels.conf or /var/lib/i2pd/tunnels.conf
+# tunconf = /var/lib/i2pd/tunnels.conf
+
+## Tunnels config files path
+## Use that path to store separated tunnels in different config files.
+## Default: ~/.i2pd/tunnels.d or /var/lib/i2pd/tunnels.d
+# tunnelsdir = /var/lib/i2pd/tunnels.d
+
+## Path to certificates used for verifying .su3, families
+## Default: ~/.i2pd/certificates or /var/lib/i2pd/certificates
+# certsdir = /var/lib/i2pd/certificates
+
+## Where to write pidfile (default: /run/i2pd.pid, not used in Windows)
+# pidfile = /run/i2pd.pid
+
+## Logging configuration section
+## By default logs go to stdout with level 'info' and higher
+## For Windows OS by default logs go to file with level 'warn' and higher
+##
## Logs destination (valid values: stdout, file, syslog)
## * stdout - print log entries to stdout
## * file - log entries to a file
## * syslog - use syslog, see man 3 syslog
log = syslog
# log = file
-## Path to logfile (default - autodetect)
-# logfile = /home/.system/var/log/i2pd/i2pd.log
-## Log messages above this level (debug, info, *warn, error, none)
+## Path to logfile (default: autodetect)
+# logfile = /var/log/i2pd/i2pd.log
+## Log messages above this level (debug, info, *warn, error, critical, none)
+## If you set it to none, logging will be disabled
+# loglevel = warn
loglevel = none
+## Write full CLF-formatted date and time to log (default: write only time)
# logclftime = true
+## Daemon mode. Router will go to background after start. Ignored on Windows
+## (default: true)
# daemon = true
## Specify a family, router belongs to (default - none)
family = sailfishos
+## Network interface to bind to
+## Updates address4/6 options if they are not set
# ifname =
+## You can specify different interfaces for IPv4 and IPv6
# ifname4 =
# ifname6 =
+## Local address to bind transport sockets to
+## Overrides host option if:
+## For ipv4: if ipv4 = true and nat = false
+## For ipv6: if 'host' is not set or ipv4 = true
# address4 =
# address6 =
+## External IPv4 or IPv6 address to listen for connections
+## By default i2pd sets IP automatically
+## Sets published NTCP2v4/SSUv4 address to 'host' value if nat = true
+## Sets published NTCP2v6/SSUv6 address to 'host' value if ipv4 = false
# host = 1.2.3.4
+
+## Port to listen for connections
+## By default i2pd picks random port. You MUST pick a random number too,
+## don't just uncomment this
# port = 4567
+## Enable communication through ipv4 (default: true)
ipv4 = true
+## Enable communication through ipv6 (default: false)
ipv6 = false
-# ssu = false
-
## Bandwidth configuration
-## L limit bandwidth to 32KBs/sec, O - to 256KBs/sec, P - to 2048KBs/sec, X - unlimited/floodfill
-bandwidth = L
-## Max % of bandwidth limit for transit. 0-100. 100 by default
-share = 20
+## L limit bandwidth to 32 KB/sec, O - to 256 KB/sec, P - to 2048 KB/sec,
+## X - unlimited
+## Default is L (regular node) and X if floodfill mode enabled.
+## If you want to share more bandwidth without floodfill mode, uncomment
+## that line and adjust value to your possibilities. Value can be set to
+## integer in kilobytes, it will apply that limit and flag will be used
+## from next upper limit (example: if you set 4096 flag will be X, but real
+## limit will be 4096 KB/s). Same can be done when floodfill mode is used,
+## but keep in mind that low values may be negatively evaluated by Java
+## router algorithms.
+# bandwidth = L
+## Max % of bandwidth limit for transit. 0-100 (default: 100)
+# share = 100
+share = 25
+## Router will not accept transit tunnels, disabling transit traffic completely
+## (default: false)
# notransit = true
+
+## Router will be floodfill (default: false)
+## Note: that mode uses much more network connections and CPU!
# floodfill = true
[ntcp2]
-enabled = true
+## Enable NTCP2 transport (default: true)
+# enabled = true
+## Publish address in RouterInfo (default: true)
# published = true
+## Port for incoming connections (default is global port option value)
# port = 4567
[ssu2]
-enabled = true
-published = true
+## Enable SSU2 transport (default: true)
+# enabled = true
+## Publish address in RouterInfo (default: true)
+# published = true
+## Port for incoming connections (default is global port option value)
# port = 4567
[http]
## Web Console settings
-enabled = true
-address = 127.0.0.1
-port = 7070
+## Enable the Web Console (default: true)
+# enabled = true
+## Address and port service will listen on (default: 127.0.0.1:7070)
+# address = 127.0.0.1
+# port = 7070
+## Path to web console (default: /)
# webroot = /
+## Enable Web Console authentication (default: false)
+## You should not use Web Console via public networks without additional encryption.
+## HTTP authentication is not encryption layer!
+# auth = true
+# user = i2pd
+# pass = changeme
auth = true
user = jolla
pass = ahoisailors!
-## Currently supported english (default), afrikaans, armenian, chinese, french,
-## german, russian, turkmen, ukrainian and uzbek languages
+## Select webconsole language
+## Currently supported english (default), afrikaans, armenian, chinese, czech, french,
+## german, italian, polish, portuguese, russian, spanish, turkish, turkmen, ukrainian
+## and uzbek languages
# lang = english
[httpproxy]
-enabled = true
-address = 127.0.0.1
-port = 4444
+## Enable the HTTP proxy (default: true)
+# enabled = true
+## Address and port service will listen on (default: 127.0.0.1:4444)
+# address = 127.0.0.1
+# port = 4444
+## Optional keys file for proxy local destination (default: http-proxy-keys.dat)
# keys = http-proxy-keys.dat
+## Enable address helper for adding .i2p domains with "jump URLs" (default: true)
+## You should disable this feature if your i2pd HTTP Proxy is public,
+## because anyone could spoof the short domain via addresshelper and forward other users to phishing links
+# addresshelper = true
addresshelper = true
+## Address of a proxy server inside I2P, which is used to visit regular Internet
# outproxy = http://false.i2p
+## httpproxy section also accepts I2CP parameters, like "inbound.length" etc.
[socksproxy]
-enabled = true
-address = 127.0.0.1
-port = 4447
+## Enable the SOCKS proxy (default: true)
+# enabled = true
+## Address and port service will listen on (default: 127.0.0.1:4447)
+# address = 127.0.0.1
+# port = 4447
+## Optional keys file for proxy local destination (default: socks-proxy-keys.dat)
# keys = socks-proxy-keys.dat
+## Socks outproxy. Example below is set to use Tor for all connections except i2p
+## Enable using of SOCKS outproxy (works only with SOCKS4, default: false)
# outproxy.enabled = false
+## Address and port of outproxy
# outproxy = 127.0.0.1
# outproxyport = 9050
+## socksproxy section also accepts I2CP parameters, like "inbound.length" etc.
|
[-]
[+]
|
Changed |
_service:tar_git:i2pd.service
^
|
@@ -17,7 +17,8 @@
ExecStart=/usr/bin/i2pd --datadir /home/.system/var/lib/i2pd --conf=/home/.system/var/lib/i2pd/i2pd.conf --tunconf=/home/.system/var/lib/i2pd/tunnels.conf --tunnelsdir=/home/.system/var/lib/i2pd/tunnels.conf.d --pidfile=/run/i2pd/i2pd.pid --daemon --service
ExecReload=/bin/sh -c "kill -HUP $MAINPID"
PIDFile=/run/i2pd/i2pd.pid
-
+### Uncomment, if auto restart needed
+#Restart=on-failure
# we log to stdout:
StandardOutput=journal+console
@@ -32,5 +33,10 @@
#KillSignal=SIGINT
#TimeoutStopSec=10m
+# If you have problems with hanging i2pd, you can try increase this
+LimitNOFILE=8192
+# To enable write of coredump uncomment this
+#LimitCORE=infinity
+
[Install]
WantedBy=multi-user.target
|
[-]
[+]
|
Changed |
_service:tar_git:i2pd.yaml
^
|
@@ -1,6 +1,6 @@
Name: i2pd
Summary: End-to-End encrypted and anonymous Internet daemon
-Version: 2.45.1
+Version: 2.50.2
Release: 1
Group: Applications/Internet
License: BSD-3-Clause
@@ -36,6 +36,7 @@
%if "%{?vendor}" == "chum"
PackageName: I2Pd
Type: console-application
+ DeveloperName: Purple I2P
PackagerName: nephros
Categories:
- Network
@@ -118,7 +119,7 @@
%if "%{?vendor}" == "chum"
PackageName: I2Pd Settings UI
Type: desktop-application
- PackagerName: nephros
+ DeveloperLogin: nephros
Categories:
- Network
- P2P
|