Repository navigation
Expand file tree
/
Copy pathINSTALL
More file actions
132 lines (100 loc) · 4.86 KB
/
Copy pathINSTALL
File metadata and controls
132 lines (100 loc) · 4.86 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
1. Dependencies
---------------
Requires libglib2.0-dev, ctags, openssl, cmake, libwebsockets4.3.3, npm, libjson-c-dev
on debian 12-
`apt-get install gcc libglib2.0-dev exuberant-ctags openssl cmake npm libjson-c-dev libsqlite3-dev pkg-config libzstd-dev`
Optional: liblocolor, available from https://www.last-outpost.com//LO/pubcode/
. If you have it installed, the makefile should detect, and colorize your
debug logs. Not used for anything else.
1.a Libwebsockets
-----------------
Libwesockets in debian 11 is the wrong version, and in debian 12
doesn't have the required options compiled in. So, you've got to get the code
from https://libwebsockets.org/repo/libwebsockets and rebuild it.
Note that for the cmake step....
# -DLWS_IPV6=ON because in deb 11 at least, that wasn't the default.
(But, it looks like IPV6 may be the lws default going forward, after commit
0fed1e15afe745989f929194c31bb8fb46fa37a8 to lws main)
# -DLWS_WITHOUT_EXTENSIONS=0 enables permessage deflate, and IS REQUIRED by LociTerm
# -DLWS_WITH_LIBUV=ON to enable libuv loop timers, and IS REQUIRED by LociTerm
# -DLWS_WITH_EVENT_LIBS=ON to enable event libraries, and IS REQUIRED by LociTerm
### -DLWS_WITH_SYS_ASYNC_DNS=1 because the default is 0, and the scanner needs async
( Not recommended in v4.4-stable or v4.5-stable, due to lws bugs, HOWEVER
after
commit f06bf536c9de123e9ffa99ff8ac2d03ad0717ad2 (HEAD -> main, origin/main, origin/HEAD)
Author: Andy Green <andy@warmcat.com>
Date: Sun Jan 25 20:24:54 2026 +0000
it looks like the ASYNC_DNS problems may have been fixed!)
### -DCMAKE_BUILD_TYPE=DEBUG will make a debug image of libwebsockets. Not normally used.
cd ~/othercode
git clone --branch v4.4-stable https://libwebsockets.org/repo/libwebsockets
cd libwebsockets
mkdir build
cd build
cmake -DLWS_IPV6=ON -DLWS_WITH_ZLIB=ON -DLWS_WITHOUT_EXTENSIONS=OFF -DLWS_WITH_LIBUV=ON -DLWS_WITH_EVENT_LIBS=ON -DLWS_WITH_SYS_ASYNC_DNS=1 ..
make
sudo make install
Tue Mar 11 12:48:46 AM EDT 2025
NOTE, libwebsockets main is working again as of commit
ef4a85d0e14270e83ce74213a0b4bb53e29a07be. I mostly use the main branch. -jsj
Sun Jan 25 05:40:55 PM EST 2026
Looks like ASYNC_DNS fixes just hit the main branch too.
2. Building LOciTerm
--------------------
cd into the directory where you found this INSTALL file.
LociTerm will install into /usr/local by default. If you want it somewhere
else, edit the makefile. (you may also have to edit lociterm.service use the
correct paths)
To build type "make".
The makefile will run npm to install the packages required by the client, build
the lociterm javascript client files, and then locid proxy binary.
Assuming all went well...
The build will place a test launcher into the top level directory that uses a
set of default server options. Try running "./lociterm" to test launching
lociterm on port 4500. The launcher should also open a new browser window or
tab to the correct url. Lociterm will try to connect to a default game running
on localhost 4000.
If that worked, great!
To install lociterm on the system, do "make install".
"make certs" to make some self signed ones if you don't have real ones.
"make systemd" to make locid run as lociterm.service at boot time.
Edit the locid.conf file (installed as /usr/local/etc/locid.conf by default)
and edit any parameters as described in the config file.
3. Proxy rules for apache2
--------------------------
Apache2 can be configured to make LociTerm's webserver available under a normal looking apache url.
To add proxy rules to apache2:
RewriteEngine on
RewriteCond %{HTTP:Upgrade} websocket [NC]
RewriteCond %{HTTP:Connection} upgrade [NC]
RewriteRule .* "wss://localhost:4005%{REQUEST_URI}" [P]
ProxyPass /lociterm https://localhost:4005/
ProxyPassReverse /lociterm https:///localhost:4005/
ProxyRequests off
4. Proxy rules for websockify
-----------------------------
Apache2 can be configured to make a MUD server available under a normal looking
apache url, in the same way.
RewriteRule ^/ws/telnet$ /ws/telnet/ [R]
RewriteCond %{HTTP:Upgrade} websocket [NC]
RewriteCond %{HTTP:Connection} upgrade [NC]
RewriteRule /ws/telnet/ "wss://localhost:4006%{REQUEST_URI}" [P]
ProxyPass /ws/telnet/ https://localhost:4006/
ProxyPassReverse /ws/telnet/ https:///localhost:4006/
You'll want to make that websockify instance a standard service. On a systemd
type system, create a file named something like 'lowebsockify.service' and put
this into it:
-----lowebsockify.service--------
[Unit]
Description=LO WebSockify Service
After=network.target
[Service]
# change this as appropriate
ExecStart=/usr/bin/websockify --cert=/etc/letsencrypt/live/www.last-outpost.com/cert.pem --key=/etc/letsencrypt/live/www.last-outpost.com/privkey.pem 4006 localhost:4000
KillMode=process
Restart=always
RestartSec=5s
User=lo
[Install]
WantedBy=multi-user.target
-----lowebsockify.service--------