I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • equincey/i2p.i2p
  • marek/i2p.i2p
  • kytv/i2p.i2p
  • agentoocat/i2p.i2p
  • aargh/i2p.i2p
  • Kalhintz/i2p.i2p
  • longyap/i2p.i2p
  • loveisgrief/i2p.i2p
  • kelare/i2p.i2p
  • y2kboy23/i2p.i2p
  • apsoyka/i2p.i2p
  • mesh/i2p.i2p
  • ashtod/i2p.i2p
  • Lfrr/i2p.i2p
  • anonymousmaybe/i2p.i2p
  • obscuratus/i2p.i2p
  • zzz/i2p.i2p
  • lbt/i2p.i2p
  • 31337/i2p.i2p
  • DuncanIdaho/i2p.i2p
  • i2p-hackers/i2p.i2p
  • thebland/i2p.i2p
  • elde/i2p.i2p
  • echelon/i2p.i2p
  • welshlyluvah1967/i2p.i2p
  • sadie/i2p.i2p
  • zlatinb/i2p.i2p
  • pVT0/i2p.i2p
  • idk/i2p.i2p
29 results
Show changes
Commits on Source (1571)
Showing
with 795 additions and 87 deletions
......@@ -29,3 +29,4 @@ installer/build
router/java/build
router/build
override.properties
\ No newline at end of file
name: Daily Workflow
on:
schedule:
# This runs at 00:00 UTC every day
# Cron syntax: minute hour day-of-month month day-of-week
- cron: '0 * * * *'
workflow_dispatch: # Allows manual triggering
permissions:
contents: read
pages: write
id-token: write
jobs:
daily-job:
runs-on: ubuntu-latest
# Ensures this only runs on the master branch
if: github.ref == 'refs/heads/master'
steps:
- name: GetText
run: sudo apt install gettext
- uses: actions/checkout@v4
- name: Set up JDK 8
uses: actions/setup-java@v4
with:
java-version: '8'
distribution: 'temurin'
- name : Generate override.properties
run: |
rm -f override.properties
echo "build.built-by=GitHub Actions" >> override.properties
echo "noExe=true" >> override.properties
- name: build with Ant
run: ant distclean pkg
- name: Upload installer.jar
uses: actions/upload-artifact@v4
with:
name: I2P-install-${{ github.sha }}.jar
path: install.jar
javadoc-latest:
runs-on: ubuntu-latest
steps:
- name: Setup Pages
uses: actions/configure-pages@v4
- name: GetText
run: sudo apt install gettext
- uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'
- name : Generate override.properties
run: |
rm -f override.properties
echo "build.built-by=GitHub Actions" >> override.properties
echo "noExe=true" >> override.properties
- name: test Debian build with Ant
run: ant distclean
- name: build javadoc with Ant
run: ant distclean javadoc updater
- name: zip javadoc and place update in javadoc zip
run: cp i2pupdate.zip build/javadoc/i2pupdate.zip && zip -r javadoc.zip build/javadoc
- name: Upload javadoc.zip
uses: actions/upload-artifact@v4
with:
name: I2P-javadoc-${{ github.sha }}.zip
path: javadoc.zip
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
# Upload javadocs to github page
path: 'build/javadoc'
- name: Deploy javadoc and dev build to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
build-java7:
runs-on: ubuntu-latest
steps:
- name: GetText
run: sudo apt install gettext
- uses: actions/checkout@v4
- name: Set up JDK 8
uses: actions/setup-java@v4
with:
java-version: '8'
distribution: 'temurin'
- name : Generate override.properties
run: |
git clone https://github.com/eyedeekay/openjdk-7 "$HOME/openjdk-7"
rm -f override.properties
echo "build.built-by=GitHub Actions" >> override.properties
echo "noExe=true" >> override.properties
echo "javac.compilerargs=-bootclasspath $HOME/openjdk-7/usr/lib/jvm/java-7-openjdk-amd64/jre/lib/rt.jar:$HOME/openjdk-7/usr/lib/jvm/java-7-openjdk-amd64/jre/lib/jce.jar -Xlint:all" >> override.properties
- name: build Maven dev build with Ant
run: ./installer/resources/maven-dev-release.sh 1
- name: Upload servlet-i2p.jar
uses: actions/upload-artifact@v4
with:
name: servlet-i2p-${{ github.sha }}.jar
path: pkg-mavencentral/servlet-i2p*.jar
- name: Upload streaming.jar
uses: actions/upload-artifact@v4
with:
name: streaming-${{ github.sha }}.jar
path: pkg-mavencentral/streaming*.jar
- name: Upload mstreaming.jar
uses: actions/upload-artifact@v4
with:
name: mstreaming-${{ github.sha }}.jar
path: pkg-mavencentral/mstreaming*.jar
- name: Upload router.jar
uses: actions/upload-artifact@v4
with:
name: router-${{ github.sha }}.jar
path: pkg-mavencentral/router*.jar
- name: Upload i2p.jar
uses: actions/upload-artifact@v4
with:
name: i2p-${{ github.sha }}.jar
path: pkg-mavencentral/i2p*.jar
......@@ -5,6 +5,11 @@ name: Java CI
on: [push]
permissions:
contents: read
pages: write
id-token: write
jobs:
build:
runs-on: ubuntu-latest
......@@ -12,9 +17,9 @@ jobs:
steps:
- name: GetText
run: sudo apt install gettext
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up JDK 8
uses: actions/setup-java@v2
uses: actions/setup-java@v4
with:
java-version: '8'
distribution: 'temurin'
......@@ -26,9 +31,92 @@ jobs:
- name: build with Ant
run: ant distclean pkg
- name: Upload installer.jar
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: I2P-install.jar-${{ github.sha }}
name: I2P-install-${{ github.sha }}.jar
path: install.jar
javadoc-latest:
runs-on: ubuntu-latest
steps:
- name: Setup Pages
uses: actions/configure-pages@v4
- name: GetText
run: sudo apt install gettext
- uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'
- name : Generate override.properties
run: |
rm -f override.properties
echo "build.built-by=GitHub Actions" >> override.properties
echo "noExe=true" >> override.properties
- name: test Debian build with Ant
run: ant distclean
- name: build javadoc with Ant
run: ant distclean javadoc updater
- name: zip javadoc and place update in javadoc zip
run: cp i2pupdate.zip build/javadoc/i2pupdate.zip && zip -r javadoc.zip build/javadoc
- name: Upload javadoc.zip
uses: actions/upload-artifact@v4
with:
name: I2P-javadoc-${{ github.sha }}.zip
path: javadoc.zip
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
# Upload javadocs to github page
path: 'build/javadoc'
- name: Deploy javadoc and dev build to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
build-java7:
runs-on: ubuntu-latest
steps:
- name: GetText
run: sudo apt install gettext
- uses: actions/checkout@v4
- name: Set up JDK 8
uses: actions/setup-java@v4
with:
java-version: '8'
distribution: 'temurin'
- name : Generate override.properties
run: |
git clone https://github.com/eyedeekay/openjdk-7 "$HOME/openjdk-7"
rm -f override.properties
echo "build.built-by=GitHub Actions" >> override.properties
echo "noExe=true" >> override.properties
echo "javac.compilerargs=-bootclasspath $HOME/openjdk-7/usr/lib/jvm/java-7-openjdk-amd64/jre/lib/rt.jar:$HOME/openjdk-7/usr/lib/jvm/java-7-openjdk-amd64/jre/lib/jce.jar -Xlint:all" >> override.properties
- name: build Maven dev build with Ant
run: ./installer/resources/maven-dev-release.sh 1
- name: Upload servlet-i2p.jar
uses: actions/upload-artifact@v4
with:
name: servlet-i2p-${{ github.sha }}.jar
path: pkg-mavencentral/servlet-i2p*.jar
- name: Upload streaming.jar
uses: actions/upload-artifact@v4
with:
name: streaming-${{ github.sha }}.jar
path: pkg-mavencentral/streaming*.jar
- name: Upload mstreaming.jar
uses: actions/upload-artifact@v4
with:
name: mstreaming-${{ github.sha }}.jar
path: pkg-mavencentral/mstreaming*.jar
- name: Upload router.jar
uses: actions/upload-artifact@v4
with:
name: router-${{ github.sha }}.jar
path: pkg-mavencentral/router*.jar
- name: Upload i2p.jar
uses: actions/upload-artifact@v4
with:
name: i2p-${{ github.sha }}.jar
path: pkg-mavencentral/i2p*.jar
name: Dockerhub
on:
push:
tags:
- 'i2p-*.*.*'
branches:
- master
jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Set env
run:
sudo apt-get install -y sed;
echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" | sed 's|master|latest|g' >> $GITHUB_ENV
- name: Build and push
uses: docker/build-push-action@v6
with:
push: true
tags: geti2p/i2p:${{ env.RELEASE_VERSION }}
- name: Build and push
uses: docker/build-push-action@v6
with:
push: true
tags: geti2p/i2p.i2p:${{ env.RELEASE_VERSION }}
# File: .github/workflows/repo-sync.yml
on:
schedule:
- cron: "30 * * * *"
workflow_dispatch:
jobs:
repo-sync:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- name: repo-sync
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
uses: repo-sync/github-sync@v2
with:
source_repo: "https://i2pgit.org/i2p-hackers/i2p.i2p"
source_branch: "master"
destination_branch: "master"
github_token: ${{ secrets.PAT }}
name: Java with IzPack Snapshot Setup
on: [push]
permissions:
contents: read
jobs:
setup:
runs-on: ubuntu-latest
steps:
- name: Install Required Packages
run: sudo apt install gettext
- name: Checkout Main Repository
uses: actions/checkout@v4
- name: Set up JDK 11
uses: actions/setup-java@v4
with:
java-version: '11'
distribution: 'temurin'
- name: Set up Maven
uses: stCarolas/setup-maven@v4.5
with:
maven-version: '3.9.9'
- name: Clone IzPack Repository
uses: actions/checkout@v4
with:
repository: 'izpack/izpack'
path: 'izpack-source'
- name: Build IzPack Snapshot
working-directory: ./izpack-source
run: |
mvn clean install -DskipTests
find . -iname 'izpack*.jar'
echo "IZPACK_HOME=$GITHUB_WORKSPACE/izpack-source/izpack-dist/target/IzPack" >> $GITHUB_ENV
echo "$GITHUB_WORKSPACE/izpack-source/izpack-dist/target/IzPack/bin" >> $GITHUB_PATH
cat > auto-install.xml << EOF
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<AutomatedInstallation langpack="eng">
<com.izforge.izpack.panels.HelloPanel/>
<com.izforge.izpack.panels.TargetPanel>
<installpath>/usr/local/IzPack</installpath>
</com.izforge.izpack.panels.TargetPanel>
<com.izforge.izpack.panels.InstallPanel/>
<com.izforge.izpack.panels.FinishPanel/>
</AutomatedInstallation>
EOF
# Create installation directory
sudo mkdir -p /usr/local/IzPack
sudo chmod 777 /usr/local/IzPack
# Run the installer in headless mode
# java -jar ./izpack-dist/target/izpack-dist-*-SNAPSHOT-installer.jar auto-install.xml
java -DINSTALL_PATH=/usr/local/IzPack -jar ./izpack-dist/target/izpack-dist-*-SNAPSHOT-installer.jar -options-system
# Update environment
echo "/usr/local/IzPack/bin" >> $GITHUB_PATH
echo "IZPACK_HOME=/usr/local/IzPack" >> $GITHUB_ENV
- name: Generate Properties
run: |
rm -f override.properties
echo "build.built-by=GitHub Actions" >> override.properties
echo "izpack.home=${{ env.IZPACK_HOME }}" >> override.properties
echo "izpack5.home=${{ env.IZPACK_HOME }}" >> override.properties
echo "izpack5.version=5.2.4-SNAPSHOT" >> override.properties
- name: Verify Setup
run: |
java -version
ant -version
echo "IzPack installation directory: $IZPACK_HOME"
ls -l $IZPACK_HOME/bin
- name: Upload IzPack Build
uses: actions/upload-artifact@v4
with:
name: izpack-snapshot-${{ github.sha }}
path: ${{ env.IZPACK_HOME }}
retention-days: 1
- name: Cache IzPack Build
uses: actions/cache@v3
with:
path: izpack-source
key: izpack-snapshot-${{ github.sha }}
restore-keys: |
izpack-snapshot-
- name: build with Ant - Non Windows
run: ant distclean pkg installer5-linux
- name: find installer artifacts
run: find . -iname 'i2p*.jar'
- name: Upload i2pinstall.jar
uses: actions/upload-artifact@v4
with:
name: i2pinstall-${{ github.sha }}.jar
path: i2pinstall*.jar
- name: build with Ant - Windows
run: ant distclean pkg installer5-windows
- name: find installer artifacts
run: find . -iname 'i2p*.exe'
- name: Upload i2pinstall.exe
uses: actions/upload-artifact@v4
with:
name: i2pinstall-${{ github.sha }}.exe
path: i2pinstall*.exe
name: mirror
on:
push:
tags:
- 'i2p-*.*.*'
workflow_dispatch: # Allows manual triggering
jobs:
dl:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
sparse-checkout: |
changelog.txt
- name: download release artifacts
run: |
sudo apt-get install wget ca-certificates gpg sed curl git
export I2P_VERSION=$(echo ${{ github.ref_name }} | sed 's|i2p-||g' |sed 's|-.*||')
echo "$I2P_VERSION"
export ATTEMPTS=0
while true; do
sleep 60m
wget -v https://files.i2p-projekt.de/"$I2P_VERSION"/i2pinstall_"$I2P_VERSION"_windows.exe && break
ATTEMPTS=$(( $ATTEMPTS + 1 ))
if [ $ATTEMPTS -eq 25 ]; then
exit 1
fi
done
wget -v https://files.i2p-projekt.de/"$I2P_VERSION"/I2P-Easy-Install-Bundle-"$I2P_VERSION"-signed.exe
wget -v https://files.i2p-projekt.de/"$I2P_VERSION"/I2P-Easy-Install-Bundle-"$I2P_VERSION".exe
wget -v https://files.i2p-projekt.de/"$I2P_VERSION"/i2pinstall_"$I2P_VERSION".jar
wget -v https://files.i2p-projekt.de/"$I2P_VERSION"/i2pinstall_"$I2P_VERSION".jar.sig
wget -v https://files.i2p-projekt.de/"$I2P_VERSION"/i2pinstall_"$I2P_VERSION"_windows.exe
wget -v https://files.i2p-projekt.de/"$I2P_VERSION"/i2pinstall_"$I2P_VERSION"_windows.exe.sig
wget -v https://files.i2p-projekt.de/"$I2P_VERSION"/i2psource_"$I2P_VERSION".tar.bz2
wget -v https://files.i2p-projekt.de/"$I2P_VERSION"/i2psource_"$I2P_VERSION".tar.bz2.sig
wget -v https://files.i2p-projekt.de/"$I2P_VERSION"/i2pupdate-"$I2P_VERSION".su3
wget -v https://files.i2p-projekt.de/"$I2P_VERSION"/i2pupdate-"$I2P_VERSION".su3.torrent
wget -v https://files.i2p-projekt.de/"$I2P_VERSION"/i2pupdate.su3
wget -v https://files.i2p-projekt.de/"$I2P_VERSION"/i2pupdate_"$I2P_VERSION".zip
wget -v https://files.i2p-projekt.de/"$I2P_VERSION"/i2pupdate_"$I2P_VERSION".zip.sig'
echo ""$I2P_VERSION"" > CHANGES.md
echo "===========" >> CHANGES.md
echo "" >> CHANGES.md
echo "" >> CHANGES.md
curl https://raw.githubusercontent.com/i2p/i2p.newsxml/master/data/entries.html | sed -n '/<article/,/<\/article/p' | sed -n '1,/<\/article>/p' | sed -n '/<\/details>/,$p' | sed '1d' | sed 's/<\/\{0,1\}p>//g' | sed 's|<\/article>||g' >> CHANGES.md
echo "" >> CHANGES.md
echo "" >> CHANGES.md
echo '```' >> CHANGES.md
head -n 25 changelog.txt >> CHANGES.md
echo '```' >> CHANGES.md
echo "" >> CHANGES.md
echo "" >> CHANGES.md
echo "## Checksums" >> CHANGES.md
echo "" >> CHANGES.md
echo "" >> CHANGES.md
echo '```' >> CHANGES.md
sha256sum * >> CHANGES.md
echo '```' >> CHANGES.md
echo "" >> CHANGES.md
echo "" >> CHANGES.md
echo '```' >> CHANGES.md
file * >> CHANGES.md
echo '```' >> CHANGES.md
echo "" >> CHANGES.md
echo "" >> CHANGES.md
cat CHANGES.md
- name: Upload artifacts
uses: ncipollo/release-action@v1
with:
artifacts: "*"
skipIfReleaseExists: true
bodyFile: "CHANGES.md"
......@@ -61,3 +61,5 @@ sloccount.sc
# TODO: why does this file appear?
apps/routerconsole/jsp/favicon.ico
.tx
/*.sh
\ No newline at end of file
......@@ -52,6 +52,7 @@ test:ant:
- echo junit.home=/usr/share/java >> override.properties
- echo hamcrest.home=/usr/share/java >> override.properties
- echo mockito.home=/usr/share/java >> override.properties
- echo build.built-by=GitHub Actions >> override.properties
script:
- ant test
only:
......@@ -59,19 +60,55 @@ test:ant:
- merge_requests
- tags
test:javadoc:
stage: test
image: debian:unstable-slim
variables:
SCALA: https://downloads.lightbend.com/scala/2.12.13/scala-2.12.13.deb
LIBPREFIX: /usr/share/scala/lib
LIB_SCALATEST: https://repo1.maven.org/maven2/org/scalatest/scalatest_2.12/3.0.4/scalatest_2.12-3.0.4.jar
LIB_SCALACTIC: https://repo1.maven.org/maven2/org/scalactic/scalactic_2.12/3.0.4/scalactic_2.12-3.0.4.jar
before_script:
# Fix bug installing openjdk-11-jdk-headless's manuals
- mkdir -p /usr/share/man/man1/
- apt-get update -q
- apt-get install -y wget gettext
ant openjdk-21-jdk-headless
libmockito-java libhamcrest-java junit4
# Install specific version of scala
- wget -qO scala.deb "${SCALA}"
- dpkg -i scala.deb
# link to the scala libs with the name `ant test` expects
- ln -s "${LIBPREFIX}/scala-xml_2.12-1.0.6.jar" "${LIBPREFIX}/scala-xml.jar"
# Download required scala libs
- wget -qO "${LIBPREFIX}/scalactic.jar" "${LIB_SCALACTIC}"
- wget -qO "${LIBPREFIX}/scalatest.jar" "${LIB_SCALATEST}"
# Point ant to the right directories
- echo scalatest.libs=/usr/share/scala/lib > override.properties
- echo junit.home=/usr/share/java >> override.properties
- echo hamcrest.home=/usr/share/java >> override.properties
- echo mockito.home=/usr/share/java >> override.properties
- echo build.built-by=GitHub Actions >> override.properties
script:
- ant javadoc
only:
- master
- merge_requests
- tags
# Make sure we can build a docker image
# It's cached for later jobs
build_docker:
stage: build
image: docker:19.03.12
image: docker:24.0.7
services:
- docker:19.03.12-dind
- docker:24.0.7-dind
script:
# Try to load latest branch image from local tar or from registry
- docker load -i ci-exports/$CI_COMMIT_REF_SLUG.tar || docker pull $CI_REGISTRY_IMAGE:latest || true
- docker build --cache-from $CI_REGISTRY_IMAGE:latest --tag $CI_REGISTRY_IMAGE:latest .
- mkdir -p ci-exports/
- docker save $CI_REGISTRY_IMAGE:latest > ci-exports/$CI_COMMIT_REF_SLUG.tar
- echo docker save $CI_REGISTRY_IMAGE:latest > ci-exports/$CI_COMMIT_REF_SLUG.tar
variables:
# When using dind service, we need to instruct docker to talk with
# the daemon started inside of the service. The daemon is available
......@@ -89,7 +126,7 @@ build_docker:
# container, thanks to volume mount from config.toml
DOCKER_TLS_CERTDIR: "/certs"
# Use TLS https://docs.gitlab.com/ee/ci/docker/using_docker_build.html#tls-enabled
DOCKER_HOST: tcp://docker:2376
# DOCKER_HOST: tcp://docker:2376
cache:
# The same key should be used across branches
key: "$CI_COMMIT_REF_SLUG"
......
This diff is collapsed.
......@@ -4,30 +4,47 @@
If you just want to give I2P a quick try or are using it on a home network, follow these steps:
1. Create two directories `i2pconfig` and `i2ptorrents`
2. Copy the following text and save it in a file `docker-compose.yml`
2. Create an `.env` file containing the `EXT_PORT` environment variable.
3. Copy the following text and save it in a file `docker-compose.yml`
```
version: "3.5"
services:
i2p:
image: geti2p/i2p
network_mode: host
ports:
- 127.0.0.1:4444:4444
- 127.0.0.1:6668:6668
- 127.0.0.1:7657:7657
- "$EXT_PORT":"$EXT_PORT"
- "$EXT_PORT":"$EXT_PORT"/udp
volumes:
- ./i2pconfig:/i2p/.i2p
- ./i2ptorrents:/i2psnark
```
3. Execute `docker-compose up`
4. Start a browser and go to `http://127.0.0.1:7657` to complete the setup wizard.
4. Execute `docker-compose up`
5. Start a browser and go to `http://127.0.0.1:7657` to complete the setup wizard.
Note that this quick-start approach is not recommended for production deployments on remote servers. Please read the rest of this document for more information.
### Building an image
There is an i2P image available over at [DockerHub](https://hub.docker.com). If you do not want to use that one, you can build one yourself:
```
docker build -t i2p .
docker build -t geti2p/i2p .
```
### Running a container
#### Environment Variables
It is possible to set the IP address where the I2P router is accessible by setting
the `IP_ADDR` environment variable in your `docker run` command or your `docker-compose`
file. For example, if you want to make your I2P router listen on all addresses, then
you should pass `-e IP_ADDR=0.0.0.0` to your `docker run` command.
It is also possible to configure the memory available to the I2P router using
environment variables. To do this, use the: `JVM_XMX` environment variable by passing,
for example, `-e JVM_XMX=256m`.
#### Volumes
The container requires a volume for the configuration data to be mounted. Optionally, you can mount a separate volume for torrent ("i2psnark") downloads. See the example below.
......@@ -59,16 +76,19 @@ A best-practices guide for cloud deployments is beyond the scope of this documen
#### Example
Here is an example container that mounts `i2phome` as home directory, `i2ptorrents` for torrents, and opens HTTP Proxy, IRC, Router Console and I2NP Protocols. It also limits the memory available to the JVM to 256MB.
```
docker build -t geti2p/i2p .
# I2NP port needs TCP and UDP. Change the 54321 to something random, greater than 1024.
docker run \
-e JVM_XMX=256m \
-e EXT_PORT=54321 \
-v i2phome:/i2p/.i2p \
-v i2ptorrents:/i2psnark \
-p 4444:4444 \
-p 6668:6668 \
-p 7657:7657 \
-p 54321:12345 \
-p 54321:12345/udp \ # I2NP port needs TCP and UDP. Change the 54321 to something random, greater than 1024.
i2p:latest
-p 127.0.0.1:4444:4444 \
-p 127.0.0.1:6668:6668 \
-p 127.0.0.1:7657:7657 \
-p "$EXT_PORT":"$EXT_PORT" \
-p "$EXT_PORT":"$EXT_PORT"/udp \
geti2p/i2p:latest
```
FROM jlesage/baseimage:alpine-3.15-glibc as builder
FROM docker.io/eclipse-temurin:17-alpine as builder
ENV APP_HOME="/i2p"
ARG ANT_VERSION="1.10.15"
WORKDIR /tmp/build
COPY . .
RUN add-pkg --virtual build-base gettext tar bzip2 apache-ant openjdk8 \
&& ant preppkg-linux-only \
&& rm -rf pkg-temp/osid pkg-temp/lib/wrapper pkg-temp/lib/wrapper.* \
&& del-pkg build-base gettext tar bzip2 apache-ant openjdk8
RUN apk add --no-cache gettext tar bzip2 curl \
&& echo "build.built-by=Docker" >> override.properties \
&& curl https://dlcdn.apache.org//ant/binaries/apache-ant-${ANT_VERSION}-bin.tar.bz2 | tar -jxf - -C /opt \
&& /opt/apache-ant-${ANT_VERSION}/bin/ant preppkg-linux-only \
&& rm -rf pkg-temp/osid pkg-temp/lib/wrapper pkg-temp/lib/wrapper.*
FROM jlesage/baseimage:alpine-3.15-glibc
FROM docker.io/eclipse-temurin:17-jre-alpine
ENV APP_HOME="/i2p"
RUN add-pkg openjdk8-jre
WORKDIR ${APP_HOME}
COPY --from=builder /tmp/build/pkg-temp .
# "install" i2p by copying over installed files
COPY docker/rootfs/ /
COPY --chown=root:root docker/rootfs/ /
RUN chmod +x /startapp.sh
# Mount home and snark
VOLUME ["${APP_HOME}/.i2p"]
......@@ -34,3 +36,4 @@ LABEL \
org.label-schema.vcs-url="https://github.com/i2p/i2p.i2p" \
org.label-schema.schema-version="1.0"
ENTRYPOINT ["/startapp.sh"]
......@@ -44,6 +44,4 @@ Supported JVMs:
Windows: OpenJDK or Oracle from http://java.com/download
Linux: OpenJDK or Oracle from http://java.com/download
FreeBSD: OpenJDK or Oracle from http://java.com/download
Raspberry Pi: Oracle 8 Early Access https://jdk8.java.net/download.html
PowerPC: IBM SDK 7 http://www.ibm.com/developerworks/java/jdk/linux/download.html
Other operating systems and JVMs: See https://trac.i2p2.de/wiki/java or https://geti2p.net/download
Other operating systems and JVMs: See https://geti2p.net/download
......@@ -65,7 +65,7 @@ To uninstall I2P:
rm -rf $I2PInstallDir ~/.i2p
Supported JVMs:
Windows: Latest available from http://java.com/download (1.7+ supported)
Linux: Latest available from http://java.com/download (1.7+ supported)
FreeBSD: 1.7-compatible (NIO required)
Other operating systems and JVMs: See http://trac.i2p2.de/wiki/java
All platforms: Java 1.8 or higher required
Windows: Latest available from http://java.com/download
Linux: Latest available from http://java.com/download
Other operating systems and JVMs: See https://geti2p.net/download
......@@ -128,10 +128,6 @@ Public domain except as listed below:
Copyright (C) 2006 The Android Open Source Project
See licenses/LICENSE-Apache2.0.txt
SSU HMAC:
Copyright (c) 2000 - 2004 The Legion Of The Bouncy Castle
See licenses/LICENSE-SHA256.txt
Installer:
(not included in distribution packages)
......@@ -267,7 +263,7 @@ Applications:
See licenses/LICENSE-Apache2.0.txt
See licenses/LICENSE-ECLIPSE-1.0.html
RRD4J 3.8 (jrobin.jar):
RRD4J 3.10 (jrobin.jar):
Copyright (c) 2001-2005 Sasa Markovic and Ciaran Treanor.
Copyright (c) 2011 The OpenNMS Group, Inc.
Copyright 2011 The RRD4J Authors.
......@@ -316,6 +312,10 @@ Applications:
See licenses/LICENSE-NDT.txt
Notice: I2P has changed specified portions of the Software, including the package edu.internet2.ndt.
Router Console Iframe-resizer 4.3.9:
Copyright (c) 2013-2023 David J. Bradshaw
See licenses/LICENSE-Iframe-resizer.txt
SAM (sam.jar):
Public domain.
......@@ -332,12 +332,19 @@ Applications:
GPLv2 (or any later version)
See licenses/LICENSE-GPLv2.txt
SusiMail Pagedown:
Original Markdown Copyright (c) 2004-2005 John Gruber
Original Showdown code copyright (c) 2007 John Fraser
Modifications and bugfixes (c) 2009 Dana Robinson
Modifications and bugfixes (c) 2009-2014 Stack Exchange Inc.
See licenses/LICENSE-pagedown.txt
Systray (systray.jar):
Public domain.
Tomcat 9.0.54 (jasper-runtime.jar):
Tomcat 9.0.88 (jasper-runtime.jar):
(not included in most distribution packages)
Copyright 1999-2021 The Apache Software Foundation
Copyright 1999-2024 The Apache Software Foundation
See licenses/LICENSE-Apache2.0.txt
See licenses/NOTICE-Tomcat.txt
......@@ -351,7 +358,7 @@ distributions. See the source package for the additional license information.
Admin Manager:
Public domain
Gradle wrapper 5.2.1:
Gradle wrapper 8.5:
(not included in most distribution packages)
Copyright (c) 2017 the original author or authors.
Copyright (c) 2023 the original author or authors.
See licenses/LICENSE-Apache2.0.txt
......@@ -9,6 +9,7 @@
<property name="javac.compilerargs" value="" />
<property name="javac.version" value="1.8" />
<property name="javac.release" value="8" />
<property name="manifest.classpath.name" value="Class-Path" />
<target name="all" depends="jar, emptyWar"/>
......@@ -57,8 +58,14 @@
<property name="workspace.changes.tr" value="" />
<jar basedir="${build}" destfile="${dist}/${jar}">
<manifest>
<attribute name="Main-Class" value="net.i2p.addressbook.Daemon"/>
<attribute name="${manifest.classpath.name}" value="i2p.jar" />
<attribute name="Main-Class" value="net.i2p.addressbook.CommandLine"/>
<attribute name="Specification-Title" value="I2P Address Book" />
<attribute name="Specification-Version" value="${api.version}" />
<attribute name="Specification-Vendor" value="The I2P Project https://geti2p.net/" />
<attribute name="Implementation-Title" value="I2P Java Address Book" />
<attribute name="Implementation-Version" value="${full.version}" />
<attribute name="Implementation-Vendor" value="The I2P Project https://geti2p.net/" />
<attribute name="Built-By" value="${build.built-by}" />
<attribute name="Build-Date" value="${build.timestamp}" />
<attribute name="Base-Revision" value="${workspace.version}" />
......@@ -77,28 +84,36 @@
</jar>
</target>
<!-- actually the jar -->
<target name="warUpToDate">
<uptodate property="war.uptodate" targetfile="${dist}/${war}">
<srcfiles dir= "." includes="${build}/**/*.class, web.xml"/>
<uptodate property="war.uptodate" targetfile="${dist}/${jar}">
<srcfiles dir= "." includes="${build}/**/*.class"/>
</uptodate>
<condition property="shouldListChanges" >
<and>
<not>
<isset property="war.uptodate" />
</not>
<isset property="mtn.available" />
<isset property="git.available" />
</and>
</condition>
</target>
<target name="changes" depends="warUpToDate" if="shouldListChanges" >
<exec executable="mtn" outputproperty="workspace.changes" errorproperty="mtn.error2" failifexecutionfails="false" >
<arg value="list" />
<arg value="changed" />
<arg value="." />
</exec>
<exec executable="git" outputproperty="workspace.changes" errorproperty="mtn.error2" failifexecutionfails="false" >
<arg value="status" />
<arg value="-s" />
<arg value="--porcelain" />
<arg value="-uno" />
<arg value="." />
</exec>
<!-- trim flags -->
<exec executable="sed" inputstring="${workspace.changes}" outputproperty="workspace.changes.sed" errorproperty="mtn.error2" failifexecutionfails="false" >
<arg value="-e" />
<arg value="s/^[MTADRCU ]*//" />
</exec>
<!-- \n in an attribute value generates an invalid manifest -->
<exec executable="tr" inputstring="${workspace.changes}" outputproperty="workspace.changes.tr" errorproperty="mtn.error2" failifexecutionfails="false" >
<exec executable="tr" inputstring="${workspace.changes.sed}" outputproperty="workspace.changes.tr" errorproperty="mtn.error2" failifexecutionfails="false" >
<arg value="-s" />
<arg value="[:space:]" />
<arg value="," />
......
......@@ -136,9 +136,17 @@ class AddressBook implements Iterable<Map.Entry<String, HostTxtEntry>> {
File tmp = null;
try {
tmp = SecureFile.createTempFile("addressbook", null, I2PAppContext.getGlobalContext().getTempDir());
// Apache 2.4 mod_deflate etag bug workaround
// strip -gzip from the etag
// Gitlab #454
String loc = subscription.getLocation();
String etag = subscription.getEtag();
if (loc.startsWith("http://i2p-projekt.i2p/") && etag != null && etag.endsWith("-gzip\""))
etag = etag.substring(0, etag.length() - 6) + '"';
EepGet get = new EepGet(I2PAppContext.getGlobalContext(), true,
proxyHost, proxyPort, 0, -1l, MAX_SUB_SIZE, tmp.getAbsolutePath(), null,
subscription.getLocation(), true, subscription.getEtag(), subscription.getLastModified(), null);
loc, true, etag, subscription.getLastModified(), null);
if (get.fetch()) {
subscription.setEtag(get.getETag());
subscription.setLastModified(get.getLastModified());
......
package net.i2p.addressbook;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import net.i2p.CoreVersion;
/**
* Simple command line access to various utilities.
* Not a public API. Subject to change.
* Apps and plugins should use specific classes.
*
* @since 0.9.55
*/
public class CommandLine extends net.i2p.util.CommandLine {
protected static final List<String> ACLASSES = Arrays.asList(new String[] {
"net.i2p.addressbook.HostTxtParser",
"net.i2p.router.naming.BlockfileNamingService",
"net.metanotion.io.block.BlockFile",
});
protected CommandLine() {}
public static void main(String args[]) {
List<String> classes = new ArrayList<String>(ACLASSES.size() + CLASSES.size());
classes.addAll(ACLASSES);
classes.addAll(CLASSES);
if (args.length > 0) {
exec(args, classes);
}
usage(classes);
System.exit(1);
}
private static void usage(List<String> classes) {
System.err.println("I2P Address book version " + CoreVersion.VERSION + '\n' +
"USAGE: java -jar /path/to/addressbook.jar command [args]");
printCommands(classes);
}
}
......@@ -32,14 +32,17 @@ import java.util.Properties;
import java.util.Set;
import net.i2p.I2PAppContext;
import net.i2p.app.ClientAppManager;
import net.i2p.client.naming.HostTxtEntry;
import net.i2p.client.naming.NamingService;
import net.i2p.client.naming.SingleFileNamingService;
import net.i2p.data.DataFormatException;
import net.i2p.data.Destination;
import net.i2p.util.OrderedProperties;
import net.i2p.util.PortMapper;
import net.i2p.util.SecureDirectory;
import net.i2p.util.SystemVersion;
import net.i2p.util.Translate;
/**
* Main class of addressbook. Performs updates, and runs the main loop.
......@@ -669,6 +672,22 @@ class Daemon {
invalid + " invalid, " +
conflict + " conflicts");
}
if (nnew > 0) {
ClientAppManager cmgr = I2PAppContext.getGlobalContext().clientAppManager();
if (cmgr != null) {
int nc = cmgr.getBubbleCount(PortMapper.SVC_SUSIDNS) + nnew;
String msg = ngettext("{0} new host", "{0} new hosts", nc);
cmgr.setBubble(PortMapper.SVC_SUSIDNS, nc, msg);
}
}
}
/**
* translate (ngettext) from the routerconsole bundle
* @since 0.9.66
*/
private static String ngettext(String s, String p, int n) {
return Translate.getString(n, s, p, I2PAppContext.getGlobalContext(), "net.i2p.router.web.messages");
}
/** @since 0.9.26 */
......@@ -697,7 +716,7 @@ class Daemon {
StringBuilder buf = new StringBuilder(16);
final int sz = dests.size();
for (int i = 0; i < sz; i++) {
buf.append(dests.get(i).toBase64().substring(0, 6));
buf.append(dests.get(i).toBase64(), 0, 6);
if (i != sz - 1)
buf.append(", ");
}
......
......@@ -17,6 +17,7 @@ import java.util.Properties;
import net.i2p.client.naming.HostTxtEntry;
import net.i2p.data.DataHelper;
import net.i2p.data.Destination;
import net.i2p.util.SecureFile;
import net.i2p.util.SecureFileOutputStream;
import net.i2p.util.SystemVersion;
......@@ -25,9 +26,9 @@ import net.i2p.util.SystemVersion;
* Utility class providing methods to parse and write files in a hosts.txt file
* format, and subscription file format.
*
* @since 0.9.26 modified from ConfigParser
* @since 0.9.26 modified from ConfigParser, public since 0.9.55 for CLI
*/
class HostTxtParser {
public class HostTxtParser {
private static final boolean isWindows = SystemVersion.isWindows();
......@@ -255,8 +256,23 @@ class HostTxtParser {
System.exit(2);
}
if (!e.hasValidSig()) {
if (!quiet)
System.err.println("Bad signature");
if (!quiet) {
System.err.println("Bad signature for " + e.getName());
String dest = e.getDest();
try {
Destination d = new Destination(dest);
System.err.println(dest);
System.err.println(d.toString());
} catch (Exception ex) {
System.err.println("Invalid destination: " + dest);
}
Properties p = e.getProps();
if (p != null) {
for (Map.Entry<?,?> m : p.entrySet()) {
System.err.println(m.getKey() + "=" + m.getValue());
}
}
}
System.exit(3);
}
Properties p = e.getProps();
......@@ -266,14 +282,30 @@ class HostTxtParser {
p.containsKey(HostTxtEntry.PROP_OLDNAME) ||
p.containsKey(HostTxtEntry.PROP_OLDSIG)) {
if (!e.hasValidSig()) {
if (!quiet)
System.err.println("Bad inner signature");
if (!quiet) {
System.err.println("Bad inner signature for " + e.getName());
for (Map.Entry<?,?> m : p.entrySet()) {
System.err.println(m.getKey() + "=" + m.getValue());
}
}
System.exit(4);
}
}
}
if (!quiet)
if (!quiet) {
System.err.println("Good signature for " + e.getName());
try {
String dest = e.getDest();
Destination d = new Destination(dest);
System.err.println(dest);
System.err.println(d.toString());
} catch (Exception ex) {}
if (p != null) {
for (Map.Entry<?,?> m : p.entrySet()) {
System.err.println(m.getKey() + "=" + m.getValue());
}
}
}
System.exit(0);
}
......