Recent comments
noptic wrote
Reply to Netherlands’ Queen Maxima Pushes for Global Digital ID Systems for Financial Access, Vaccine Verification and More by PrivacyOsint
This is why a parallel economy is being built out right now. You will be able to bypass their systems and join other freedom loving people who are prospering.
Learn to use Monero, it is a 100% private digital payment system that is just like cash, no one can spy on your transactions. (http://site.get-monero.i2p/)
https://moneromarket.io/ is a site where you can buy and sell goods using Monero.
whyO OP wrote
PrivacyOsint wrote
Reply to comment by not_bob in notbob.i2p - stats for 2023 by not_bob
Trying to make a difference with one step at a time adds up over the years.
not_bob wrote (edited )
In the near future I plan to be writing more little toys like this. Then plan is to have a toys.notbob.i2p site with a list of useful things.
Here is code what what I have running. You can see an example of it running here http://5gn3ca4z4occksx2cnwbcrun2mum2eg2c7zgfi7k7fetruwzmdiq.b32.i2p/count.html
To use it, you need include code like the following.
<img src="http://5gn3ca4z4occksx2cnwbcrun2mum2eg2c7zgfi7k7fetruwzmdiq.b32.i2p/conter.cgi?page=123456789k&color=green" height=40>
Pick a number. That will be your site number. Or, you can use a new number for each html page. But, any page with the same number will increment that number's count.
As for the color. Use normal color names. They should work. No hex colors. If you do not specify a color then it will default to black text. The background will be transparent.
Anyone is welcome to use this freely. Enjoy!
#!/usr/bin/perl
# code by notbob.i2p
use warnings;
use Fcntl ':flock'; # Import LOCK_* constants
use Time::HiRes qw(usleep); # For sub-second sleeping
use CGI qw/:standard/;
$site = param("site");
$site =~ s/\D//g;
$color = param("color");
$color = lc($color);
$color =~ s/[^a-z]//g;
if ( $color eq "" ) { $color = "black"; }
print("Content-type: image/svg+xml\n\n");
# File to store the page counter
my $counterFile = "/comhtml/5gn3ca4z4occksx2cnwbcrun2mum2eg2c7zgfi7k7fetruwzmdiq.b32.i2p/counter/$site.txt";
# Function to read the current counter value
sub read_counter {
my ($filename) = @_;
open(my $fh, '<', $filename) or die "Cannot open file $filename: $!";
flock($fh, LOCK_SH); # Shared lock for reading
my $counter = <$fh>;
chomp($counter);
close($fh);
return $counter;
}
# Function to increment and save the counter
sub save_counter {
my ($filename, $counter) = @_;
open(my $fh, '>', $filename) or die "Cannot open file $filename: $!";
while (!flock($fh, LOCK_EX | LOCK_NB)) {
# If the file is locked, wait a short time and try again
usleep(100000); # 100 milliseconds
}
print $fh $counter;
close($fh);
}
# Read current counter value from file
my $counter = -e $counterFile ? read_counter($counterFile) : 0;
# Increment the counter
$counter++;
# Save updated counter value to file
save_counter($counterFile, $counter);
# Generate HTML page counter span
#print "Content-Type: text/html\n\n";
#print "<span id=\"counter\">$counter</span>\n";
print "<svg width=\"100\" height=\"50\" xmlns=\"http://www.w3.org/2000/svg\">
<text x=\"10\" y=\"40\" font-family=\"Arial\" font-size=\"40\" fill=\"$color\">$counter</text>
</svg>";
To use this, you will also need to create a counter directory on the webserver and give it read-write permission for whatever webserver you are running.
not_bob wrote
Reply to comment by bottticelli in Hit count implementation on static eepsite by bottticelli
I have added a way to change the color. just add &color=color to the end of the url and it will change the text color. The background will be transparent.
You can use any normal color name, red, green, blue, purple, orange, plum, and so on. If you don't like these colors, try others.
if you do not specify a color it will default to black. If you try an invalid color, it will default to black.
not_bob wrote
Reply to comment by bottticelli in Hit count implementation on static eepsite by bottticelli
It should show a transparent box with a black number in it. If your site is set to dark mode that will not work.
So long as your browser has access to I2P it should work.
bottticelli OP wrote
Reply to comment by not_bob in Hit count implementation on static eepsite by bottticelli
Thank you very much /u/not_bob/, I appreciate. However, as of now this feature is not working on my side. There is blank space in place of the counter rectangle. What can be the possible issue? How do you think?
righttoprivacy wrote
That is an interesting console I never heard of! Looks a lot like a small arcade. Pretty neat.
not_bob wrote (edited )
I have written a counter you can use in a static site.
To use the counter just include the following code in your html.
<img src="http://5gn3ca4z4occksx2cnwbcrun2mum2eg2c7zgfi7k7fetruwzmdiq.b32.i2p/counter.cgi?site=123842384" height=30>Change the site number to a random number, and that will be your site number. Feel free to adjust the height to anything you want, the output is a svg file, so it will scale.
You could even use a different site number for each page on your site. Each site has it's own unique count.
As for logging. That server logs access just as any other normal webserver does. I do not share the data with anyone, and the only identifying information that is collected by the server is the b32 of the client who hits the site and the time/date.
not_bob OP wrote
Reply to comment by noptic in notbob.i2p - stats for 2023 by not_bob
We already have mirrors of quite a few useful sites and working outproxies.
Also, you are welcome. I work hard to be a useful member of the community.
not_bob wrote
Reply to comment by z3d in Hit count implementation on static eepsite by bottticelli
Very good, but it should really use flock for file locking to prevent possible race conditions.
But, so long as the site isn't getting a really large number of hits, this is unlikely to be a problem even if you don't use it.
z3d wrote (edited )
With the default I2P webserver (Jetty), assuming you have perl installed, you can run perl scripts from eepsite/cgi-bin. Something like the following will provide a basic pagecounter when embedded in a iframe:
#!/usr/bin/perl
use strict;
use warnings;
# File to store the page counter
my $counterFile = "counter.txt";
# Read current counter value from file
my $counter = 0;
if (-e $counterFile) {
open(my $fh, '<', $counterFile);
$counter = <$fh>;
chomp($counter);
close($fh);
}
# Increment the counter
$counter++;
# Save updated counter value to file
open(my $fh, '>', $counterFile);
print $fh $counter;
close($fh);
# Generate HTML page counter span
print "Content-Type: text/html\n\n";
print "<span id=\"counter\">$counter</span>\n";
noptic wrote
Reply to notbob.i2p - stats for 2023 by not_bob
Looks like I2P usage and content is growing. I hope we will have most of the internet available on I2P in a few years.
Thanks for hosting your valuable service for all this time, you are a trooper.
not_bob wrote
The only other one I use is irc.ilita.i2p.
Though, there are quite a few that are active.
http://notbob.i2p/cgi-bin/defcon.cgi?search=irc
I can't vouch for how active or useful they are though.
not_bob wrote
If you have a static site, you are limited to using someone else's counter. There is no way to run PHP code from a static site. Also, even if you were to use JavaScript, there is no way for your static site to store that data. So, still not an option.
The only real solution with such a site is to use someone else's counter as you mention in #2.
Not all I2P users have a clearnet outproxy configured. So, using a clearnet service is not the best option. Possible privacy issues aside.
I have a counter on the front of my notbob page. If you mouse over the van on the upper left side you will see a little box with a green graph. While it does not currently show the count, it still counts.
It would not be hard to write a multi-user count. I could likely code one up that would work for anyone pretty quickly. Something basic that just displays a number.
You would embed it into the html code with <img src="http://countersite.i2p/cgi-bin/counter.cgi?site=324832483">
Note the random number. There would be no need for me to even know what site it's counting for.
And, that would all you would have to do on your end. That is if you just want a count. If you want graphs and more complex breakdowns, that's another story.
But, a simple one would be easy. And, as for privacy, so long as you trust the person who's counter you are using, then you are good.
Feel free to hit me up on IRC if you want to discuss this further.
As for discussion, this is a good place to do it.
bottticelli wrote
Reply to Idea for how Ramble can become the best (and maybe most influential) free speech forum by raincoat
Thank you, gentlemen raincoat and Rambler, for discussing this issue. Even though I am a random guy passing by, the concerns you raise do touch me. I feel that free speech issues should never be forgotten here. It would be of my great pleasure to try raising this topic from ashes and encourage other forum users having a look and thinking about it one more time.
Meanwhile, I will try to help in increasing the awareness, despite the smallness of my resource. Absolute freedom of speech must exist not only for the sake of conspiracy giggling.
z3d OP wrote (edited )
Reply to comment by TheArkive in I2P+ 2.4.0+ released! by z3d
I have a typical firewall up (router) that is difficult to punch a hole in.
If you're talking about a hardware router, you should be able to port forward from the router's internet facing interface to an internal IP address that's hosting your I2P/I2P+ router. You only need to do that for the public I2P port, for both TCP and UDP. You'll find your router operates much, much better if you can overcome the firewalling of your I2P port. The assigned port is indicated on: http://127.0.0.1:7657/confignet
Regarding general activity, I2P+ is much more aggressive in blocking, banning or otherwise ignoring routers on the network that may be participating in attacks or are poorly configured and maintained, so that's probably why you're seeing a difference in network traffic. Keep an eye on the banned peers counter and the tunnel build success percentage in the sidebar in I2P+, these will give you some idea of the network health.
TheArkive wrote
Reply to I2P+ 2.4.0+ released! by z3d
I've been tinkering with I2P and I2P+ lately. I have a typical firewall up (router) that is difficult to punch a hole in. I read that I2P+ is better with firewalled routers.
Are the recent attacks likely to cause problems in this regard?
I ask because, behind a firewall, my stats are much more active on regular I2P currently than my tests with I2P+.
I consider myself a bit of an I2P/+ noob, though I have tinkered with it a lot on and off for over a decade. I finally have a dedicated home server that I'm trying to setup. So far so good, except for this oddity.
bottticelli OP wrote
Thank you all guys, and especially to whyO, who pointed me exactly to the right thing. Indeed I had to discover this hidden folder and then found all the necessary directories and an index.html file that does recognize changes! Finally...
not_bob wrote
As stated by other people, you should use the Java installer. Don't use the package that's in whatever repo you are using. Those tend to be outdated. Also, I2P+ for the win.
whyO OP wrote
Reply to comment by CommenTater in Alternative to teddit.i2p since it has been down. by whyO
I use it to lurk the official sub and other privacy subs that the site maker has good taste in featuring. I should note that teddit isn't down but being BLOCKED by reddit.
whyO wrote
Reply to comment by bottticelli in Eepsite does not recognize changes in index.html by bottticelli
As a sidenote the .i2p folder is a hidden file folder so you need to tick show hidden files.
z3d wrote
Reply to comment by bottticelli in Eepsite does not recognize changes in index.html by bottticelli
Personally I'd always opt for the Java installer over the repo/deb installation because installing it yourself gives you much more flexibility, for example if you want to sidegrade from I2P to I2P+, or if you want to test development builds, in addition to having all your configuration files in a single location (as mentioned).
You can stop the I2P service and try out the java installer if you don't want to fully commit before you've got comfortable. You could always try the I2P+ installer, details at: http://skank.i2p
Back to your original question, given you're currently running a repo installation, and you appear to be editing files in the correct location, the only thing I can think of that may be causing issues is your browser cache retaining the default index.html file which redirects to /help. You can test this theory by creating a separate file in docroot/ and browsing directly to that instead, e.g. testpage.html .. if this works, clear your browser cache and try accessing the site again. And be mindful of the file permissions on any new files you create.
bottticelli OP wrote
Reply to comment by z3d in Eepsite does not recognize changes in index.html by bottticelli
I checked and double-checked, my ~/ dir does not have the .i2p folder, it comes only as an installed package at /var/lib/i2p/i2p-config/...
Do you think it's a good idea to perform a full re-install and get it manually in the ~/.i2p folder? I'm prety satisfied for now with the /var/lib/i2p/i2p-config/ directory, it seems quite equivalent for an i2p-newbie...
Thank you for the channel recommendation, I'll definitely pay attention to it.
noptic wrote
Reply to Fauci Admits to Arbitrary Rules That Boosted Mass Surveillance and Suppressed Opinions by PrivacyOsint
I'm shocked, a career criminal engaged in new crimes!