IRCaBot 2.1.0
GPLv3 © acetone, 2021-2022
#i2p-dev
/2023/12/03
RN orignal, I chose that name about 20 years ago... and it refers to the child's game of hiding the eyes, not a social network
RN peek-a-boo ≠ pikabu.ru
orignal but pronouced the same
RN yes. ))
snex feature request for i2psnark - when creating a torrent, allow excluding files based on pattern. id be willing to code this if theres support to get it pulled in
RN voice is temp, ask one of the ops if you want it to stick
RN :)
snex doing 'ant pkg' gives 'java.lang.NoClassDefFoundError: java/util/jar/Pack200' :( ive tried multiple different javas
dr|z3d snex: which repo are you using to build?
snex github - i think i figured it out tho, ant was not recognizing my java version switch
dr|z3d well, pack200 disappeared in java14.
dr|z3d so if you build with a version older than that, you won't see the issue.
snex yeah. thats what i was on and i tried switching to others but ant looks at JAVA_HOME rather than `which java`
dr|z3d also, ant pkg may not be what you want.
dr|z3d 'ant installer' will give you a full cross-platform installer, or ant updater will give you an update.zip
dr|z3d unless you're running / compiling I2P+, pack200 is also deprecated, fyi.
snex im following what the README says on how to build the source
dr|z3d well, take it from me, you don't need ant pkg for the most part. either the installer or the updater is usually what you'll want to build.
dr|z3d you can see ant targets by typing 'ant'
dr|z3d the main point being that neiter 'ant installer' nor 'ant updater' will invoke/require pack200.
snex if i am making changes to i2psnark, dont i need to run 'ant pkg'?
dr|z3d if you want an updater for your local install, then ant updater will include any changes to snark.
dr|z3d if you want to build just the snark components, (.jar and .war), then ant buildI2PSnark, or if you want to build a standalone snark zip, ant i2psnark
dr|z3d ant pkg is akin to "i'm about to do a new release, build me everything"
dr|z3d both ant updater and ant installer will incorporate any changes in your local workspace.
dr|z3d the buildI2PSnark target can be used to test mods to snark without requiring the router to be restarted. you just need to copy build/i2psnark.war to ~/i2p/webapps/ and build/i2psnark.jar to ~/i2p/lib/
dr|z3d then you restart snark from /configclients in your router console.
dr|z3d i'll usually rm -rf build/ and apps/i2psnark/java/build/ just to be sure I'm getting the latest edits. you can also do ant distclean, but that will require i2p to be recompiled.
dr|z3d (but normally shouldn't be necessary)
dr|z3d curious, snex
dr|z3d you could do something with the text input to validate the regex string.
dr|z3d attach an event listener to the submit button, perhaps, with something like:
dr|z3d function validateRegex() {
dr|z3d var regexString = document.getElementById("regexInput").value;
dr|z3d try {new RegExp(regexString);}
dr|z3d catch (e) {alert("Invalid regex: " + e.message);}
dr|z3d you probably also want to log the error to the screenlog, in brief. not the full java error, just something like "Failed to create torrent - invalid file exclusion regex supplied"
eyedeekay git.idk.i2p is going to have to become an HTTPS service with a self-signed certificate, I'll post more on forum about the transition today and how to handle it
eyedeekay including key fingerprints of people want them
snex dr|z3d: am i wrong in thinking throw new IOException writes the string supplied to the screen log? i was following the pattern elsewhere in the file
snex it seems that there are also restrictions on javascript in lots of places, probably for good reason. even though this is a simple validator, given that lots of people will have js disabled entirely, server side validation needs to happen anyway
dr|z3d snex: good question, re screenlogs, but you don't want to print an IOException there, too messy, either way.
dr|z3d as for javascript, running it locally in snark is fine, it'll preempt the IO exception if it's enabled, if not then screenlogs are the backup plan.
snex so i did a quick js validation and it complains about unsafe-script stuff. i assume this has to be registered somewhere in order to flag it as safe. just not sure it's worth the effort
dr|z3d and I think you'll find most people have javascript enabled in snark, not least because without it, updates to the torrents listing is janky.
dr|z3d you need to use an event listener with onsubmit to get the js to work, you can't use inline js like onclick or whatever.
dr|z3d and nonces, don't forget about those!
eyedeekay gah, to fix the docker runner I have to update to docker 1.41, but I use the Ubuntu docker.io package which is still 1.39
RN packages packages packaes
RN ;)
snex the one in docker's apt repo is 1.5
dr|z3d eyedeekay: ubuntu's not showing me that version or anything like it. but whatever, snapcraft.io/docker maybe?
snex the one on snap says 20.10.24, when i do docker --version of the one in docker's apt repo, it lists 24.0.6
snex and apt search lists it as 1.5-2 ¯\_(ツ)_/¯
eyedeekay API version, do a `docker version`
eyedeekay Also I'm back on Bionic
eyedeekay I'm not on docker's apt repo
eyedeekay fresh backup time...
eyedeekay At least this one isn't riddled with PPA's and pins
snex API version: 1.43
eyedeekay API version: 1.39 here but regardless the answer is to upgrade, so that's what I've got to spend time doing
snex dr|z3d: i have updated the code to do a client-side validation. just realized the pull went to the i2p repo rather than my fork, did not intend for that
zzz yeah we're not going to take that PR, you can try to convince plus to take it
snex ive moved it to my fork so you can still see the code: github.com/snex/i2p.i2p/pull/1
dr|z3d I'm not averse to the code, looks like a useful addition.