forked from I2P_Developers/i2p.i2p
Compare commits
6 Commits
8a216a4d7d
...
6af930ce84
Author | SHA1 | Date | |
---|---|---|---|
6af930ce84 | |||
b583b9fe74 | |||
8fb5f7f14a | |||
488759c66b | |||
968f03e8c7 | |||
8df589b142 |
75
.github/workflows/mirror-release.yml
vendored
75
.github/workflows/mirror-release.yml
vendored
@ -1,75 +0,0 @@
|
||||
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"
|
66
.github/workflows/sync.yaml
vendored
Normal file
66
.github/workflows/sync.yaml
vendored
Normal file
@ -0,0 +1,66 @@
|
||||
# GitHub Actions workflow file to sync an external repository to this GitHub mirror.
|
||||
# This file was automatically generated by go-github-sync.
|
||||
#
|
||||
# The workflow does the following:
|
||||
# - Runs on a scheduled basis (and can also be triggered manually)
|
||||
# - Clones the GitHub mirror repository
|
||||
# - Fetches changes from the primary external repository
|
||||
# - Applies those changes to the mirror repository
|
||||
# - Pushes the updated content back to the GitHub mirror
|
||||
#
|
||||
# Authentication is handled by the GITHUB_TOKEN secret provided by GitHub Actions.
|
||||
|
||||
jobs:
|
||||
sync:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Validate Github Actions Environment
|
||||
run: if [ "$GITHUB_ACTIONS" != "true" ]; then echo 'This script must be run in a GitHub Actions environment.'; exit 1; fi
|
||||
- name: Checkout GitHub Mirror
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Configure Git
|
||||
run: |-
|
||||
git config user.name 'GitHub Actions'
|
||||
git config user.email 'actions@github.com'
|
||||
- env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
name: Sync Primary Repository
|
||||
run: |-
|
||||
# Add the primary repository as a remote
|
||||
git remote add primary https://i2pgit.org/I2P_Developers/i2p.i2p.git
|
||||
|
||||
# Fetch the latest changes from the primary repository
|
||||
git fetch primary
|
||||
|
||||
# Check if the primary branch exists in the primary repository
|
||||
if git ls-remote --heads primary master | grep -q master; then
|
||||
echo "Primary branch master found in primary repository"
|
||||
else
|
||||
echo "Error: Primary branch master not found in primary repository"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Check if we're already on the mirror branch
|
||||
if git rev-parse --verify --quiet master; then
|
||||
git checkout master
|
||||
else
|
||||
# Create the mirror branch if it doesn't exist
|
||||
git checkout -b master
|
||||
fi
|
||||
|
||||
|
||||
# Force-apply all changes from primary, overriding any conflicts
|
||||
echo "Performing force sync from primary/master to master"
|
||||
git reset --hard primary/master
|
||||
|
||||
|
||||
# Push changes back to the mirror repository
|
||||
git push origin master
|
||||
name: Sync Primary Repository to GitHub Mirror
|
||||
"on":
|
||||
push: {}
|
||||
schedule:
|
||||
- cron: 0 * * * *
|
||||
workflow_dispatch: {}
|
@ -245,7 +245,12 @@ public class SnarkManager implements CompleteListener, ClientApp, DisconnectList
|
||||
// Vuze - unregistered
|
||||
"crs2nugpvoqygnpabqbopwyjqettwszth6ubr2fh7whstlos3a6q.b32.i2p",
|
||||
"opentracker.r4sas.i2p", "punzipidirfqspstvzpj6gb4tkuykqp6quurj6e23bgxcxhdoe7q.b32.i2p",
|
||||
"opentracker.skank.i2p", "by7luzwhx733fhc5ug2o75dcaunblq2ztlshzd7qvptaoa73nqua.b32.i2p"
|
||||
"opentracker.skank.i2p", "by7luzwhx733fhc5ug2o75dcaunblq2ztlshzd7qvptaoa73nqua.b32.i2p",
|
||||
"opentracker.simp.i2p", "wc4sciqgkceddn6twerzkfod6p2npm733p7z3zwsjfzhc4yulita.b32.i2p",
|
||||
"opentracker.eeptorrent.i2p", "bjnkpy2rpwwlyjgmxeolt2cnp7h4oe437mtd54hb3pve3gmjqp5a.b32.i2p",
|
||||
"omitracker.i2p", "a5ruhsktpdhfk5w46i6yf6oqovgdlyzty7ku6t5yrrpf4qedznjq.b32.i2p",
|
||||
// unregistered
|
||||
"6kw6voy3v5jzmkbg4i3rlqjysre4msgarpkpme6mt5u2jw33nffa.b32.i2p"
|
||||
}));
|
||||
|
||||
static {
|
||||
|
@ -387,34 +387,30 @@ public class EepGet {
|
||||
return name;
|
||||
}
|
||||
|
||||
|
||||
/* Blacklist borrowed from snark */
|
||||
|
||||
private static final char[] ILLEGAL = new char[] {
|
||||
/** Blacklist borrowed from snark */
|
||||
private static final char[] ILLEGAL = new char[] {
|
||||
'<', '>', ':', '"', '/', '\\', '|', '?', '*',
|
||||
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
|
||||
16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
|
||||
0x7f };
|
||||
|
||||
/**
|
||||
* Removes 'suspicious' characters from the given file name.
|
||||
* http://msdn.microsoft.com/en-us/library/aa365247%28VS.85%29.aspx
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Removes 'suspicious' characters from the given file name.
|
||||
* http://msdn.microsoft.com/en-us/library/aa365247%28VS.85%29.aspx
|
||||
*/
|
||||
private static String sanitize(String name) {
|
||||
if (name.equals(".") || name.equals(" "))
|
||||
return "_";
|
||||
String rv = name;
|
||||
if (rv.startsWith("."))
|
||||
rv = '_' + rv.substring(1);
|
||||
if (rv.endsWith(".") || rv.endsWith(" "))
|
||||
rv = rv.substring(0, rv.length() - 1) + '_';
|
||||
for (int i = 0; i < ILLEGAL.length; i++) {
|
||||
if (rv.indexOf(ILLEGAL[i]) >= 0)
|
||||
rv = rv.replace(ILLEGAL[i], '_');
|
||||
}
|
||||
return rv;
|
||||
if (name.equals(".") || name.equals(" "))
|
||||
return "_";
|
||||
String rv = name;
|
||||
if (rv.startsWith("."))
|
||||
rv = '_' + rv.substring(1);
|
||||
if (rv.endsWith(".") || rv.endsWith(" "))
|
||||
rv = rv.substring(0, rv.length() - 1) + '_';
|
||||
for (int i = 0; i < ILLEGAL.length; i++) {
|
||||
if (rv.indexOf(ILLEGAL[i]) >= 0)
|
||||
rv = rv.replace(ILLEGAL[i], '_');
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
|
||||
private static void usage() {
|
||||
|
@ -13,6 +13,7 @@ import java.io.BufferedOutputStream;
|
||||
import java.io.EOFException;
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
import java.net.InetAddress;
|
||||
import java.net.Socket;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.ArrayList;
|
||||
@ -239,6 +240,13 @@ class ClientConnectionRunner {
|
||||
_sessions.clear();
|
||||
}
|
||||
|
||||
/**
|
||||
* @since 0.9.66
|
||||
*/
|
||||
public InetAddress getAddress() {
|
||||
return _socket.getInetAddress();
|
||||
}
|
||||
|
||||
/**
|
||||
* Current client's config,
|
||||
* will be null if session not found
|
||||
|
@ -37,6 +37,7 @@ import net.i2p.util.VersionComparator;
|
||||
* Also migrate jetty.xml from Jetty 7/8 to Jetty 9.
|
||||
*
|
||||
* For each client for class org.mortbay.jetty.Server:
|
||||
*</p>
|
||||
*<pre>
|
||||
* Let $D be the dir that jetty.xml is in (usually ~/.i2p/eepsite)
|
||||
* Saves $D/jetty.xml to $D/jetty6.xml
|
||||
@ -48,6 +49,7 @@ import net.i2p.util.VersionComparator;
|
||||
* Copies $I2P/eepsite-jetty7/etc/* to $D/etc
|
||||
* Changes main class in clients.config
|
||||
*</pre>
|
||||
*<p>
|
||||
* Copies clients.config to clients.config.jetty6;
|
||||
* Saves new clients.config.
|
||||
*
|
||||
|
Reference in New Issue
Block a user