Quick Blog Links

about   root @       
 
  MacOS/iOS Applications   [x-code + objective-c]  
 
  SSHPass Automation Program   [python / app]  
 
  DHCP/ARP Relay-Bridge ~ Proxying   [c / lan]  
 
  ARP Sync + Route Replacement   [python / networking]  
 
  DNS-VPN ~ UDP-SSL   [python / networking]  
 
  OpenVPN MODs ~~ BULK ++ MTIO ++ DUAL   [c / networking]  
 
  VPN Multi-Proc/Thread TUN-TCP Full-MTU Bulk-Data EXE   [c / networking]  
 
written   Secure LAN Communication   [College Thesis]  
 
  College Project – Teaching Hacking!   [Course Paper]  
 
  ARM Assembly – A Basic Introduction…   [Blog Post]  
 
configs   Mac Mini ++ Lenovo Mini   Firewalling ~~ eb|iptables  
 
  Cisco and OpenWRT   NFTables FlowTable  
  Ubiquiti and OpenWRT   Routing ~~ Balancing  
 
gear   Home Stuff || WiFi Networks  
 
 
# Note: github.com/fossjon <- I lost access due to missing 2fa, so now I'm using -> github.com/stoops
for p in `seq 1 3` ; do
  curl -sL "https://fossjon.com/feed/?paged=$p" | grep -Ei '<(title|link)>' \
    | sed -e 's@<title@~<title@g' | tr ' \t\r\n' ' ' | tr -s ' ' | tr '~' '\n' \
    | sed -e 's@^.*<title>\(.*\)</title>.*<link>\(.*\)</link>.*$@<a href="\2" style="text-decoration:none;font-family:monospace;">\1</a><br/>@' \
    | grep -i '/fossjon.com/'
done > blog.html
   
   pages  
   1   2   3   4   5   |  6   7   8   9   10   
 11   12   13   14   15   |  16   17   18   19   20 

Trying Out A Set Of Hacky Tampermonkey Javascript Modifications For A Better kick.com Live Stream Video Experience

The kick.com live stream video experience on the web is not the best overall, it seems to constantly lose track of a previously buffered section of the live stream and then sends you to the live portion but mine also gets stuck on reconnecting again and remains frozen until a manual refresh! I tried to write a series of hacky javascript modifications to help solve the following issues:

  • Always show the bottom video controls bar on the live stream video
  • Always set the volume level to 100% instead of the continually defaulted 50%
  • Accepts a basic timestamp parameter to seek to in a live stream video
  • Keeps track of your latest buffered video seek position
  • Auto reseeks to the last known tracked timestamp if the buffered video jumps forward to live stream and auto reloads the page with the timestamp parameter if the stream connection becomes frozen
// ==UserScript==
// @name         klol
// @namespace    http://tampermonkey.net/
// @version      2026-08-19
// @description  try to take over the world!
// @author       You
// @match        https://kick.com/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=kick.com
// @grant        none
// @noframes
// ==/UserScript==

(function() {
    'use strict';

    var murl = location.href;
    var stop = "";
    var wait = 5;

    function mmov() {
        var elem = document.getElementsByTagName("video");
        if (elem.length > 0) {
            const mous = new MouseEvent("mousemove", { bubbles:true, cancelable:true, view:window });
            elem[0].dispatchEvent(mous);
        }
        setTimeout(mmov, 0.91 * 1000);
    }
    setTimeout(mmov, 0.91 * 1000);

    function msec(inpt) {
        var info = inpt.split(":");
        if (info.length == 3) {
            return ((parseInt(info[0]) * 3600) + (parseInt(info[1]) * 60) + parseInt(info[2]));
        }
        return 0;
    }

    var r = -1;
    var d = -2;
    function mtxt() {
        var s = location.href.replace(/\?.*$/mig, "");
        var l = document.getElementsByClassName("text-xs");
        if ((l.length > 0) && (l[0].innerText.match(/^[0-9]*:[0-9]*:[0-9]*$/mig))) {
            var t = l[0].innerText;
            var u = msec(t);
            var c = document.getElementById("channel-content");
            if (c) {
                var o = c.getElementsByClassName("min");
                if (o.length > 0) {
                    var q = document.querySelector("video");
                    var z = document.getElementById("time");
                    if (!z) {
                        o[0].innerHTML = ("<span style='font-family:Monaco;'><a href='" + s + "'><b>&lt;---&gt;</b></a> &nbsp; <span id='secs'>[X]</span> &nbsp; <span id='time'>" + t + "</span> &nbsp; </span>" + o[0].innerHTML);
                    } else {
                        var w = z.innerText;
                        var v = msec(w);
                        if (murl.includes("?t=")) {
                            var p = parseFloat(murl.replace(/^.*t=/mig, ""));
                            console.log(" TIME " + q.readyState + ":" + p);
                            const leftKey = new KeyboardEvent("keydown", { bubbles:true, cancelable:true, keyCode:37, which:37, key:"ArrowLeft", code:"ArrowLeft" });
                            document.dispatchEvent(leftKey);
                            q.currentTime = p;
                            murl = "";
                        }
                        if ((q.readyState != 0) && (q.readyState != 4) && (stop == "")) {
                            console.log(" LOAD " + q.readyState + ":" + r);
                            if (wait < 1) {
                                if (r > 15) {
                                    location.href = (s + "?t=" + r);
                                } else {
                                    location.href = s;
                                }
                                stop = "x";
                            } else {
                                wait -= 1;
                            }
                        }
                        if ((v + (15 * 60)) > u) {
                            var x = parseInt(q.currentTime);
                            if (Math.abs(x - d) > 15) {
                                var y = document.getElementById("secs");
                                r = x; d = -2;
                                z.innerText = t;
                                y.innerText = (" [" + r + "] ");
                            } else {
                                r = -1; d = x;
                            }
                        } else {
                            console.log(" KICK " + q.readyState + ":" + z.innerText);
                            q.currentTime = r;
                        }
                    }
                }
            }
        }
        setTimeout(mtxt, 1.91 * 1000);
    }
    setTimeout(mtxt, 1.91 * 1000);

    function maud() {
        var volu = document.querySelector("video");
        if (volu) { volu.volume = 1; }
        setTimeout(maud, 3.91 * 1000);
    }
    setTimeout(maud, 3.91 * 1000);
})();

Lessons Learned From Implementing Multi-Threaded VPNs!

When reading packets or network data from a tunnel interface, the order in which they are read does matter as they can impact connectionless protocols and also cause stateful protocols to spend time re-ordering data! There were three techniques that I tried implementing to solve this issue:

  • Map a packet address to a thread index during the entire time of every connection state
  • Index and order every packet read by number and wait to write them out in the same sequence
  • Lock and time and order each threaded process just like many pistons firing inside of an engine block

~

A Highly Modified ARCF Stream Cipher Implementation In C

So after spending a few years working first on a encrypted proxy solution and then moving to a encrypted tunnel solution, I’ve carried forward this highly modified version of the RC4 stream cipher, trying to tune it up and make improvements to it over time. This latest version includes the following features over the original version.

ARCF-DROP-INIT-CBCX-AUTH

  • Extended key state generation algorithm to shuffle and drop the first 768-bytes
  • Enhanced KSGA to incorporate and weight both the secret key as well as a 256-bit initialization vector
  • Added IV can also include a 40-bit increasing counter to help prevent replay attacks
  • Core crypto allows for Cipher Byte Chaining which will XOR the last output byte with the next input byte
  • Core crypto loop also mixes in the IV and the CBC byte values into the key state
  • The key state itself is never directly used but instead only the XOR of two other key state byte index values
  • The IV is then encrypted by the unique key state to provide a trailing 256-bit authentication hash tag

[C Snippet]

Source Code: https://github.com/stoops/vpn/blob/main/lib/enc.c

~

There Are Two Kinds Of VPNs…

I’ve spent a few years now looking for a higher-performing network-wide Proxy or VPN service. I’ve modified some frameworks, like nginx and openvpn, and I’ve created my own versions of those frameworks as well. After modifying OpenVPN, I decided to implement my own version of that modified functionality in roughly 1000 lines of C from 0. I spent some time recently fixing it up and tuning it up and I just wanted to summarize and write about it again. I’ve observed that there are 2 kinds of VPNs with 2 highly different use cases and design differences required. For example:

Client (WiFi) -> VPN -> Server (Wire) [service] - This can be UDP based as the client is directly setting the lower sized MTU tunnel interface on it's operating system so that it can properly size the outgoing packets before they are sent out from the machine so they won't be fragmented or dropped during the routing through the network as well as the underlying connection can also be too flakey for other protocols. 
Router (Wire) -> VPN -> Server (Wire) [infrastructure] - This should be TCP based which can handle a full sized MTU tunnel interface as the data is sent out in a synchronous stream rather than individual packets and the clients are not aware of any smaller sized MTUs in the middle of the network routing path as they assume a standardized 1500 byte MTU size by default and in addition there is less risk of communication interruption for a wired connection. 

The code is written in C and can be ran with multiple processes at the same time and each process will launch multiple threads which will all operate on a TUN interface created by that process so that the traffic can be load balanced across interfaces as well. The threads will read multiple packets in bulk and transfer them all over TCP in a single large size write/read socket call. It is fairly efficient and performative in my testing so far! No Bloat!!

Picture Post: fossjon.com/2026/01/04/going-back-to-re-…

🙂

Source Code: github.com/stoops/vpn/blob/main/tun.c

~

Experimenting with nftables flowtable as an iptables enthusiast

I am presently experimenting with a software-based routing-offload feature of nftables that I am not used as an iptables fan called flowtable. I haven’t had a chance yet to measure the performance of this config but I am using the commands below to help set it up in my firewall:

NOTE: If you are using a bridged or vlan interface, you also now need to add the parent hardware interface to the flowtable devices list as well!

nft add flowtable ip filter fast "{ hook ingress priority 0; devices = { eth0, eth1 }; counter; }"
nft add rule ip filter FORWARD iifname "eth0" oifname "eth1" ct state "{ established, related }" counter flow add @fast
nft add rule ip filter FORWARD iifname "eth1" oifname "eth0" ct state "{ established, related }" counter flow add @fast
nft add rule ip filter FORWARD iifname "eth0" oifname "eth1" ct state "{ established, related }" counter accept
nft add rule ip filter FORWARD iifname "eth1" oifname "eth0" ct state "{ established, related }" counter accept

You will see some connections being tracked and offloaded with the conntrack -L command:

tcp 6 src=192.168.99.1 dst=1.2.3.4 sport=52077 dport=443 src=1.2.3.4 dst=10.10.10.2 sport=443 dport=52077 [OFFLOAD] mark=17 use=2
udp 17 src=192.168.99.1 dst=2.3.4.5 sport=53055 dport=4500 src=2.3.4.5 dst=10.10.10.2 sport=4500 dport=53055 [OFFLOAD] mark=17 use=2

~

Google Cancels Gmailify! :O :(

Link: https://support.google.com/mail/answer/16604719?hl=en

First, Yahoo cancels simple mail forwarding. Then I try to use the Google gmailify feature to get my email as well as be able to send mail on behalf of my domain name. Next, Google cancels gmailify so now I have recently switched everything over to Fastmail, which offers both of these features plus the label organization and filtering capabilities — but for a price of course. Anyway, I’ve been using Gmail for many many years since it was Beta as my default mail client but now that time has come to an end sadly…

😦

The Typeplus Stabilizer Design & Movement

I wanted to highlight this interesting new keyboard stabilizer design that the Typeplus Stabilizer offers. It has a hooked wiring ending insert which basically slides/glides along an internal track within the stem housing when actuated. With only a little bit of lube needed, there is no wire ending rattling or ticking that can occur because of that simple hooked wire and track movement design. I will be testing these out first in the 7U spacebar on the Mode Envoy!

Kit: https://kbdfans.com/products/typeplus-x-yikb-screw-in-stabilizer

Going back to re-implement the work I once started for the VPN TUN C program…

Long screen cap warning: I recently went back to reimplement a test program I started of a basic VPN TUN application. I implemented a similar version of the work that I placed in the OpenVPN framework but with a highly-modified crypto stream cipher and random number generator!

Note: I reposted about this later on in this blog post

Source: https://github.com/stoops/vpn/tree/main

~