What's new

pixelserv pixelserv - A Better One-pixel Webserver for Adblock

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

@kvic THANK YOU! Super happy with this. Any reason why the restart was’t added as last line of the script?

@lonelycoder it would be great if this script could be added to your install menu, makes it super easy for noobs like me to experiment

When @Protik asked about tutorial of installing test version, I started preparing a script. Then I saw @Raphie asked, so I finished it up. There might be some glitch but here we're.

A script to automate the installation of test version of pixelserv-tls (and reverting back to prod version).

ssh into your router, copy and paste:
Code:
sh -c "$(wget -qO - https://kazoo.ga/pixelserv-tls/install-beta.sh)"

Then follow the instructions.

You can use the script to install test version whenever there is one announced. It'll always install the latest test version.

I've tested install and restore on 56U (arm7).

Output of install
Output of restore
According to this page,https://wikidevi.com/wiki/ASUS_RT-AC5300, rt-ac5300 is ARM.

Pick 1. arm for your router.
 
@kvic THANK YOU! Super happy with this. Any reason why the restart was’t added as last line of the script?

So that ppl had a feeling of involvement in the process. I added a few seconds delay to give ppl an impression the script is working hard too :)

But you're right. I could include the restart as well as check for architecture and suggest the correct one to pick.
 
What you guys do here is invalueable for people like me who really appreciate the benefits, but are not Linux literate enough to do this ourselves. I think this will bring a big uptake in your betatesting as well.
 
I guess I'm a bit late. I got busy, but KL test 6 on mipsel ran good for me. It didn't crash at all or anything. I don't have a servstats page, because it got restarted when my lists update on sundays. I see there's a test 8 out now. I'll have to give that a go. Also, great job creating a installation script. I'm sure that will help a lot of people wanting to use pixelserv-tls, but not sure exactly how. Keep up the good work.
 
After 7 hours of use:

pixelserv-tls: v35.HZ12.Kl-test8b compiled: Nov 19 2017 08:47:07 options: 192.168.1.2

uts 0d 04:56 process uptime
log 1 critical (0) error (1) warning (2) notice (3) info (4) debug (5)
kcc 1 number of active service threads
kmx 5 maximum number of service threads
kvg 0.38 average number of requests per service thread
krq 5 max number of requests by one service thread
req 756 total # of requests (HTTP, HTTPS, success, failure etc)
avg 525 bytes average size of requests
rmx 3029 bytes largest size of request(s)
tav 17 ms average processing time (per request)
tmx 350 ms longest processing time (per request)
slh 0 # of accepted HTTPS requests
slm 4 # of rejected HTTPS requests (missing certificate)
sle 0 # of rejected HTTPS requests (certificate available but bad)
slc 253 # of dropped HTTPS requests (client disconnect without sending any request)
slu 5 # of dropped HTTPS requests (unknown error)
nfe 100 # of GET requests for server-side scripting
gif 0 # of GET requests for GIF
ico 0 # of GET requests for ICO
txt 17 # of GET requests for Javascripts
jpg 0 # of GET requests for JPG
png 0 # of GET requests for PNG
swf 0 # of GET requests for SWF
sta 12 # of GET requests for HTML stats
stt 1 # of GET requests for plain text stats
ufe 2 # of GET requests /w unknown file extension
opt 0 # of OPTIONS requests
pst 4 # of POST requests
hed 0 # of HEAD requests (HTTP 501 response)
rdr 8 # of GET requests resulted in REDIRECT response
nou 0 # of GET requests /w empty URL
pth 0 # of GET requests /w malformed URL
204 0 # of GET requests (HTTP 204 response)
bad 0 # of unknown HTTP requests (HTTP 501 response)
tmo 0 # of dropped requests (client timeout before connection accepted)
cls 257 # of dropped requests (client disconnect without sending any request)
cly 0 # of dropped requests (client disconnect before response sent)
clt 0 # of dropped requests (reached maximum service threads)
err 0 # of dropped requests (unknown reason)
 
Ran test8b for a bit last night and found it had crashed within a half hour or so. Looked through my logs to (eventually) discover there was a problem with the someonewhocares source list, and removed it. Been fine since then. Up 15:20 with 2900 requests, tav is 3ms.

Just a heads up in case anyone else is using that source. I haven’t checked it today yet to see if it’s fixed.
 
8a was OK. 8b looks to have a problem with the kvg counter; shouldn't be less than 1:
Code:
pixelserv-tls: v35.HZ12.Kl-test8b compiled: Nov 19 2017 08:47:07 options: 192.168.0.201

uts 0d 00:05 process uptime
log 1 critical (0) error (1) warning (2) notice (3) info (4) debug (5)
kcc 1 number of active service threads
kmx 40 maximum number of service threads
kvg 0.63 average number of requests per service thread
krq 5 max number of requests by one service thread
req 127 total # of requests (HTTP, HTTPS, success, failure etc)
avg 728 bytes average size of requests
rmx 1802 bytes largest size of request(s)
tav 19 ms average processing time (per request)
tmx 101 ms longest processing time (per request)
 
@kvic logging was a simple -l switch up to and including Kk. Kl added the levels 1-5, so now we need to set a level or else pixelserv will fail to start.
Could Kl handle that gracefully, say if only -l is set to default to -l 1 for example?
 
@kvic logging was a simple -l switch up to and including Kk. Kl added the levels 1-5, so now we need to set a level or else pixelserv will fail to start.
Could Kl handle that gracefully, say if only -l is set to default to -l 1 for example?
It defaults to -l 1 without the -l flag. Is there a scenario where you’d want to have the default level of logging but by using -l rather than just omitting?
 
Uploaded KL-test8c.

This is what I've prepared last night. Please check my link for what's updated in 8c.

@thelonelycoder I tried actually but couldn't get it done without adding a big chunk of code just for this purpose. It didn't justify back then. I don't know what happened but I would give it a good read after work.
 
@thelonelycoder I tried actually but couldn't get it done without adding a big chunk of code just for this purpose. It didn't justify back then. I don't know what happened but I would give it a good read after work.
With Kk and older -l was a valid switch, now with Kl -l is no longer valid and fails to start.
The same happens if you downgrade from Kl to Kk and have -l [loglevel] set.
At the minimum Kl should simply ignore it if no [loglevel] is passed along with -l.
Especially now that you have a simple to use script to update to the test version and then revert back through it to Kk (or the previous version installed in /opt/bin).
It defaults to -l 1 without the -l flag. Is there a scenario where you’d want to have the default level of logging but by using -l rather than just omitting?
I don't know how many users have logging enabled in Kk, but once Kl becomes available with opkg they will complain that pixelserv-tls no longer works.
AB-Solution had a simple logging on/off function to toggle -l on. When Kl test came out, I removed the toggle and added it to the "Add or remove switches" section since Kl requires an additional argument for the -l switch.
Users may not be aware of that change and there's no conclusive error output in the Syslog if it fails to start because of a wrong logging setting.
 
This is a helpful comment on @kvic s https://kazoo.ga/pixelserv-tls/ page:
Supported browsers for HTTPS connections

  • Android >= 4.4.2; Chrome >= 51; Firefox >= 49
  • IE 11 Win 10; Edge >= 13; Safari >= 9; Apple ATS 9 iOS 9
  • IE 11 Win 7,8.1; IE 11 Winphone 8.1; Opera >= 17; Safar 7 iOS 7.1
 
Last edited:
@thelonelycoder

I revisited my code and found an easy fix. In next update, '-l' will have backward compatibility as in <= version Kk. In the old semantics, '-l' means '-l 4' in KL. So '-l' will default to meaning of '-l 4' in KL.

Hopefully everyone will be happy now :)
 
@thelonelycoder

I revisited my code and found an easy fix. In next update, '-l' will have backward compatibility as in <= version Kk. In the old semantics, '-l' means '-l 4' in KL. So '-l' will default to meaning of '-l 4' in KL.

Hopefully everyone will be happy now :)
Thanks!
 
Tried to install 8c using the script and got this:

Code:
admin@RT-AC68U-DF28:/tmp/home/root# sh -c "$(wget -qO - https://kazoo.ga/pixelserv-tls/install-beta.sh)"

This script (v0.1.1) will download and install KL-test8c test version of pixelserv-tls.
The script will guide you through and automate the process.

The script currently only support these Entware-ng architectures:

   1. armv7     - backup prod versoin and install arm7 test version KL-test8c
   2. mipsel   - backup prod version and install mipsel test version KL-test8c
   3. restore  - revert back to prod version and clean up test directory

Type 1, 2 or 3 to proceed or anything else to quit:

1

Now we'll attempt to download

    pixelserv-tls.KL-test8c.Entware-ng.armv7softfloat.zip
to
    /opt/tmp/pixelserv-tls-beta

Downloaded pixelserv-tls.KL-test8c.Entware-ng.armv7softfloat.zip
Unzipping...

Archive:  pixelserv-tls.KL-test8c.Entware-ng.armv7softfloat.zip
  inflating: LICENSE
  inflating: README.md
unzip: can't open 'dist/pixelserv-tls.arm.ent.performance.dynamic': Text file busy
Failed to unzip pixelserv-tls.KL-test8c.Entware-ng.armv7softfloat.zip

Now we'll proceed to backup /opt/bin/pixelserv-tls and install the beta binary
Type 'yes' to continue..

I did Ctrl+C and exited without typing yes.
 
Tried to install 8c using the script and got this:

Code:
admin@RT-AC68U-DF28:/tmp/home/root# sh -c "$(wget -qO - https://kazoo.ga/pixelserv-tls/install-beta.sh)"

This script (v0.1.1) will download and install KL-test8c test version of pixelserv-tls.
The script will guide you through and automate the process.

The script currently only support these Entware-ng architectures:

   1. armv7     - backup prod versoin and install arm7 test version KL-test8c
   2. mipsel   - backup prod version and install mipsel test version KL-test8c
   3. restore  - revert back to prod version and clean up test directory

Type 1, 2 or 3 to proceed or anything else to quit:

1

Now we'll attempt to download

    pixelserv-tls.KL-test8c.Entware-ng.armv7softfloat.zip
to
    /opt/tmp/pixelserv-tls-beta

Downloaded pixelserv-tls.KL-test8c.Entware-ng.armv7softfloat.zip
Unzipping...

Archive:  pixelserv-tls.KL-test8c.Entware-ng.armv7softfloat.zip
  inflating: LICENSE
  inflating: README.md
unzip: can't open 'dist/pixelserv-tls.arm.ent.performance.dynamic': Text file busy
Failed to unzip pixelserv-tls.KL-test8c.Entware-ng.armv7softfloat.zip

Now we'll proceed to backup /opt/bin/pixelserv-tls and install the beta binary
Type 'yes' to continue..

I did Ctrl+C and exited without typing yes.

Thanks for letting me know. That's a glitch in the install-beta.sh script (v0.1.1).

Now is fixed (in v0.1.2). To solve the problem:

1. stop pixelserv-tls first by:
Code:
/opt/etc/init.d/S80pixelserv-tls stop
2. then re-run the install-beta.sh script, and restart pixelserv-tls
 
In Kl you can enter "pixelserv-tls -v", or any invalid switch to get the version number in the output. This is not supported in Kk and possibly earlier versions.
There's "killall -SIGUSR1 pixelserv-tls" to send it to the syslog, but this means grepping the syslog for the version number.
Is there any quick unobtrusive way to get the version number consistent through the versions?

Edit: There is always "opkg info pixelserv-tls" but this gives the one installed by Entware and not the version currently running if the test version is installed.
 
Last edited:
In Kl you can enter "pixelserv-tls -v", or any invalid switch to get the version number in the output. This is not supported in Kk and possibly earlier versions.
There's "killall -SIGUSR1 pixelserv-tls" to send it to the syslog, but this means grepping the syslog for the version number.
Is there any quick unobtrusive way to get the version number consistent through the versions?

Edit: There is always "opkg info pixelserv-tls" but this gives the one installed by Entware and not the version currently running if the test version is installed.

How about this? Shall work for all versions:
Code:
ver=$(wget -qO - http://doubleclick.com/servstats.txt | grep -o ' v[0-9a-zA-Z\.\-]*' | sed 's/^ //')
echo $ver
 
How about this? Shall work for all versions:
Code:
ver=$(wget -qO - http://doubleclick.com/servstats.txt | grep -o ' v[0-9a-zA-Z\.\-]*' | sed 's/^ //')
echo $ver
Removing word "version" from Kk or older, works for all:
Code:
ver=$(wget -qO - http://doubleclick.com/servstats.txt | grep -o ' v[0-9a-zA-Z\.\-]*' | sed 's/^ //; s/version//')
echo $ver
That'll do, thanks.
 
OK, to finalize this, here's an unobtrusive way for Kl and possibly onward, without triggering the stt stats counter:
Code:
newVersion=$(echo $(pixelserv-tls -v) | grep -o ' v[0-9a-zA-Z\.\-]*')
echo $newVersion
 

Similar threads

Latest threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top