x9srv
- *THIS IS A WORK IN PROGRESS *
x9srv provides authsrv, bind, tlssrv, cpu and exportfs, suitable for interacting with 9front
- There is a working tlsclient available for Unix-like systems available at https://git.sr.ht/~moody/tlsclient
libmp, libsec, libauthsrv are adapted from 9front and Aiju's code in jsdrawterm
libc9 is from sigrid's c9
libexportfs is a statically linked lib pulled from 9front's drawterm. It was linked against amd64
Building
Requires plan9port
mk all && mk install
authsrv
authsrv expects there to be at least the following files and directories in the chroot:
/lib/ndb/auth
/adm/$user
/adm/$user/secret
/adm/$user/key
You can use passtokey
from authsrv9 to generate keys, following the guide at https://www.ueber.net/who/mjl/plan9/plan9-obsd.html
This is an incomplete version of authsrv, but should suffice for simple file shares and sessions.
exportfs
See exportfs(4)
tlssrv, tlsclient
See tlssrv(8)
Usage
listen1 -t 'tcp!*!564' exportfs
# Start a normal cpu listener
listen1 -t 'tcp!*!17010' cpu -R
# Start an authsrv listener
listen1 -t 'tcp!*!567' authsrv
rcpu listener setup - probably broken
#!/bin/rc
fn server {
# WIP!
tmp=`{mktemp -d}
$PLAN9/bin/disk/mkfs -d $tmp /path/to/a/proto
# Try to chroot and read commands from the remote connection
/usr/sbin/chroot $tmp /bin/rc <{n=`{read} && ! ~ $#n 0 && read -c $n} >[2=]
}
listen1 -t 'tcp!*!17019' tlssrv -a /bin/rc -c server