Browse Source

Merge pull request #9907 from yangfl/master

i2pd: Update to 2.28.0
lilik-openwrt-22.03
Hannu Nyman 5 years ago
committed by GitHub
parent
commit
fb80e4a44e
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 113 additions and 16 deletions
  1. +6
    -2
      net/i2pd/Makefile
  2. +14
    -11
      net/i2pd/files/i2pd.config
  3. +5
    -3
      net/i2pd/files/i2pd.init
  4. +88
    -0
      net/i2pd/patches/config.patch

+ 6
- 2
net/i2pd/Makefile View File

@ -9,13 +9,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=i2pd
PKG_VERSION:=2.26.0
PKG_VERSION:=2.28.0
PKG_RELEASE:=1
PKG_BUILD_PARALLEL:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/PurpleI2P/i2pd/tar.gz/$(PKG_VERSION)?
PKG_HASH:=2ae18978c8796bb6b45bc8cfe4e1f25377e0cfc9fcf9f46054b09dc3384eef63
PKG_HASH:=181327edc7cf5b3c25ee51ecc518a4da90fa9e421eca2107996791038a514a21
PKG_MAINTAINER:=David Yang <mmyangfl@gmail.com>
PKG_LICENSE:=BSD-3-Clause
@ -43,6 +43,7 @@ define Package/i2pd/conffiles
/etc/config/i2pd
/etc/i2pd/i2pd.conf
/etc/i2pd/tunnels.conf
/etc/i2pd/tunnels.d/*
endef
TARGET_LDFLAGS+=-latomic
@ -62,6 +63,9 @@ define Package/i2pd/install
s/datadir = \/var\/lib/datadir = \/etc/ \
' $(1)/etc/i2pd/i2pd.conf
$(INSTALL_CONF) $(PKG_BUILD_DIR)/contrib/tunnels.conf $(1)/etc/i2pd
$(INSTALL_DIR) $(1)/etc/i2pd/tunnels.d
$(INSTALL_CONF) $(PKG_BUILD_DIR)/contrib/tunnels.d/*.conf $(1)/etc/i2pd/tunnels.d
# subscriptions.txt deprecated, see #8088
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/i2pd.init $(1)/etc/init.d/i2pd
endef


+ 14
- 11
net/i2pd/files/i2pd.config View File

@ -1,15 +1,18 @@
config i2pd
# Set where i2pd should store its data (netDB, certificates, addresses, etc)
# By default we store it in RAM so no data is written to ROM.
# IMPORTANT!
# Data is consistently rewritten. DO NOT POINT IT TO INNER ROM. Flash will
# die.
# Set where i2pd should store its data (netDB, certificates, addresses,
# etc). By default we store it in RAM so no data is written to ROM.
# If you store data permanently, you may want to enable
# 'profiles = true' and 'addressbook = true' in i2pd.conf
#### IMPORTANT! ####
# Data is consistently rewritten. DO NOT POINT IT TO INNER ROM. Flash
# will die.
option data_dir '/var/lib/i2pd'
# If you don't store i2pd data permanently, you can still choose to store only
# addressbook. If not, i2pd will be forced to do HTTP reseeding reseeding on
# every start. Storing addressbook may be useful if HTTP reseeding is not
# possible or blocked (by censorship).
# Even addressbook doesn't take up too much space, extroot is still strongly
# recommended to avoid flash wear-out.
# If you don't store i2pd data permanently, you can still choose to
# store only addressbooks. If not, i2pd will be forced to do HTTP
# reseeding on every start. Storing addressbook may be useful
# if HTTP reseeding is not possible or blocked (by censorship).
# Even addressbook doesn't take up too much space, extroot is still
# strongly recommended to avoid flash wear-out.
# Enable 'addressbook = true' in i2pd.conf to make it take effect.
#option addressbook_dir '/etc/i2pd/addressbook'

+ 5
- 3
net/i2pd/files/i2pd.init View File

@ -11,7 +11,7 @@ PROG=/usr/sbin/i2pd
USER="i2pd"
GROUP="i2pd"
PIDFILE=/var/run/i2pd.pid
#DATADIR=/var/lib/i2pd
DATADIR=/var/lib/i2pd
CONFFILE=/etc/i2pd/i2pd.conf
. /lib/functions.sh
@ -23,14 +23,13 @@ i2pd_start() {
local data_dir
local addressbook_dir
config_get data_dir "$cfg" data_dir
config_get data_dir "$cfg" data_dir "$DATADIR"
config_get addressbook_dir "$cfg" addressbook_dir
## Setting up data dir
if [ ! -d "$data_dir" ]; then
mkdir -p "$data_dir"
ln -s /usr/share/i2pd/certificates "$data_dir/certificates"
ln -s /etc/i2pd/tunnels.conf "$data_dir/tunnels.conf"
if [ -n "$addressbook_dir" ]; then
if [ ! -d "$addressbook_dir" ]; then
mkdir -p "$addressbook_dir"
@ -49,6 +48,9 @@ i2pd_start() {
procd_set_param command "$PROG" --service --conf="$CONFFILE" --pidfile "$PIDFILE"
## Don't know about i2pd user's HOME
procd_set_param env "HOME=$DATADIR"
## For debugging, provide about 512 MB on external storage for coredump and adjust /proc/sys/kernel/core_pattern
# echo "/tmp/coredumps/core.%e.%p.%s.%t" > /proc/sys/kernel/core_pattern
# procd_set_param limits core="unlimited unlimited"
procd_set_param limits nofile=4096
procd_set_param stdout 1
procd_set_param stderr 1


+ 88
- 0
net/i2pd/patches/config.patch View File

@ -0,0 +1,88 @@
diff -u -r a/contrib/i2pd.conf b/contrib/i2pd.conf
--- a/contrib/i2pd.conf 2019-09-04 11:00:27.660713504 +0800
+++ b/contrib/i2pd.conf 2019-09-04 11:07:53.669745273 +0800
@@ -8,12 +8,12 @@
## Tunnels config file
## Default: ~/.i2pd/tunnels.conf or /var/lib/i2pd/tunnels.conf
-# tunconf = /var/lib/i2pd/tunnels.conf
+tunconf = /etc/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.conf.d
+tunnelsdir = /etc/i2pd/tunnels.conf.d
## Where to write pidfile (don't write by default)
# pidfile = /var/run/i2pd.pid
@@ -25,12 +25,12 @@
## * stdout - print log entries to stdout
## * file - log entries to a file
## * syslog - use syslog, see man 3 syslog
-# log = file
+log = syslog
## Path to logfile (default - autodetect)
# logfile = /var/log/i2pd.log
## Log messages above this level (debug, *info, warn, error, none)
## If you set it to none, logging will be disabled
-# loglevel = info
+loglevel = error
## Write full CLF-formatted date and time to log (default: write only time)
# logclftime = true
@@ -61,7 +61,7 @@
# ifname6 =
## Enable NTCP transport (default = true)
-# ntcp = true
+ntcp = false
## If you run i2pd behind a proxy server, you can only use NTCP transport with ntcpproxy option
## Should be http://address:port or socks://address:port
# ntcpproxy = http://127.0.0.1:8118
@@ -81,7 +81,7 @@
## Router will not accept transit tunnels, disabling transit traffic completely
## (default = false)
-# notransit = true
+notransit = true
## Router will be floodfill
# floodfill = true
@@ -91,8 +91,10 @@
## Uncomment and set to 'false' to disable Web Console
# enabled = true
## Address and port service will listen on
-address = 127.0.0.1
+address = 192.168.1.1
+# address = ::
port = 7070
+# strictheaders = false
## Path to web console, default "/"
# webroot = /
## Uncomment following lines to enable Web Console authentication
@@ -104,7 +106,7 @@
## Uncomment and set to 'false' to disable HTTP Proxy
# enabled = true
## Address and port service will listen on
-address = 127.0.0.1
+address = 192.168.1.1
port = 4444
## Optional keys file for proxy local destination
# keys = http-proxy-keys.dat
@@ -118,7 +120,7 @@
## Uncomment and set to 'false' to disable SOCKS Proxy
# enabled = true
## Address and port service will listen on
-address = 127.0.0.1
+address = 192.168.1.1
port = 4447
## Optional keys file for proxy local destination
# keys = socks-proxy-keys.dat
@@ -228,4 +230,5 @@
[persist]
## Save peer profiles on disk (default: true)
-# profiles = true
+profiles = false
+addressbook = false

Loading…
Cancel
Save