Site Tools


Hotfix release available: 2024-02-06a "Kaos". upgrade now! [55.1] (what's this?)
New release available: 2024-02-06 "Kaos". upgrade now! [55] (what's this?)
archbox

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
archbox [2019/01/31 15:45] 2a01:4f8:191:327:a4fe:87ff:fecc:dde9archbox [2021/10/31 10:42] (current) – external edit 127.0.0.1
Line 1: Line 1:
 +===== Host =====
 +<file - /etc/tor/torrc>
 +AutomapHostsOnResolve 1
 +TransPort 9040
 +TransListenAddress 10.0.0.1
 +DNSPort 5053
 +DNSListenAddress 10.0.0.1
 +</file>
 +<file - /etc/systemd/network/10-tornet.netdev>
 +[NetDev]
 +Name=tornet
 +Kind=bridge
 +</file>
 +<file - /etc/systemd/network/25-bridge-static.network>
 +[Match]
 +Name=tornet
  
 +[Network]
 +Address=10.100.100.1/24
 +</file>
 +<code bash>
 +pacman -S tor
 +systemctl enable --now tor systemd-networkd
 +#iptables -t nat -I POSTROUTING -s 10.100.100.0/24 -j MASQUERADE
 +iptables -A FORWARD -i tornet -o tornet -p udp --dport=5053 -j ACCEPT
 +iptables -t nat -A PREROUTING -i tornet -p udp -m udp --dport 53 -j DNAT --to-destination 127.0.0.1:5053
 +iptables -t nat -A PREROUTING -i tornet -p tcp -j DNAT --to-destination 127.0.0.1:9040
 +iptables -A INPUT -i tornet -p tcp --dport 9040 -j ACCEPT
 +virt-install --vnc --name=archbox --vcpus 1 --memory 2024 --disk pool=vg0,size=100 --cdrom /var/lib/libvirt/images/archlinux-2018.06.01-x86_64.iso --network bridge:tornet --virt-type kvm --autostart --noautoconsole
 +</code>
 +Sources
 +  * https://tor.stackexchange.com/a/333
 +  * https://blog.project-insanity.org/2018/04/20/sandbox-and-torify-signal-messenger-on-linux/
 +
 +===== Guest ===== 
 +
 +===== ttyd notes ===== 
 +<code bash>
 +cd html
 +# do your modifications
 +yarn install
 +yarn run build
 +# yarn run start
 +</code>
 +modifications for sub path
 +<file - src/server.h>
 +#define WS_PATH "/abc123/ws"
 +</file>
 +not needed since it detects or includes sub urls:
 +<file - html/js/app.js>
 +        + (window.location.pathname.endsWith('/') ? '' : '/') + 'abc123/ws',
 +</file>
 +<file - html/index.html>
 +     <script src="/abc123/auth_token.js"></script>
 +</file>
 +<file - src/http.c>
 +           if (strncmp(pss->path, "/abc123/auth_token.js", 14) == 0) {
 +[...]
 +            if (strcmp(pss->path, "/abc123") != 0) {
 +</file>
 +now the issue: illegal ws path