4 Commits

Author SHA1 Message Date
idk
f89dd04d13 fix makefile 2023-01-28 01:42:44 +00:00
idk
7b5270eb70 don't forget to rate-limit the new ping feature, once per 24 hours 2023-01-28 01:37:44 +00:00
idk
1f31b5551b fix makefile 2023-01-28 00:56:08 +00:00
idk
fbeb8c43b3 Fix makefile 2023-01-28 00:51:16 +00:00
3 changed files with 18 additions and 5 deletions

View File

@@ -1,5 +1,5 @@
VERSION=0.2.32
VERSION=0.2.33
APP=reseed-tools
USER_GH=eyedeekay
CGO_ENABLED=0
@@ -46,7 +46,7 @@ install:
mkdir -p /var/lib/i2p/
mkdir -p /var/lib/i2p/i2p-config/reseed/
install -g i2psvc -o i2psvc -d /var/lib/i2p/i2p-config/reseed/
cp -r content /var/lib/i2p/i2p-config/reseed/content
cp -r reseed/content /var/lib/i2p/i2p-config/reseed/content
chown -R i2psvc:i2psvc /var/lib/i2p/i2p-config/reseed/
install -m644 etc/systemd/system/reseed.service.d/override.conf /etc/systemd/system/reseed.service.d/override.conf
install -m644 etc/systemd/system/reseed.service /etc/systemd/system/reseed.service
@@ -269,7 +269,7 @@ upload-single-su3:
tmp/content:
mkdir -p tmp
cp -rv content tmp/content
cp -rv reseed/content tmp/content
echo "you@mail.i2p" > tmp/signer
tmp/lib:
@@ -282,7 +282,7 @@ tmp/LICENSE:
SIGNER_DIR=$(HOME)/i2p-go-keys/
su3s: tmp/content tmp/lib tmp/LICENSE build
rm -f plugin.yaml
rm -f plugin.yaml client.yaml
i2p.plugin.native -name=reseed-tools-$(GOOS)-$(GOARCH) \
-signer=hankhill19580@gmail.com \
-signer-dir=$(SIGNER_DIR) \

View File

@@ -19,7 +19,7 @@ func main() {
app := cli.NewApp()
app.Name = "reseed-tools"
app.Version = "0.2.32"
app.Version = "0.2.33"
app.Usage = "I2P tools and reseed server"
auth := &cli.Author{
Name: "eyedeekay",

View File

@@ -97,7 +97,20 @@ var AllReseeds = []string{
"https://www2.mk16.de/",
}
func yday() time.Time {
today := time.Now()
yesterday := today.Add(-24 * time.Hour)
return yesterday
}
var lastPing = yday()
func PingEverybody() []string {
if lastPing.After(yday()) {
log.Println("Your ping was rate-limited")
return nil
}
lastPing = time.Now()
var nonerrs []string
for _, urlInput := range AllReseeds {
err := PingWriteContent(urlInput)