On Mon, Oct 6, 2008 at 2:52 PM, Don Stewart
<dons@galois.com> wrote:
Is the code around somewhere? This sounds intriguing.
-- Don
Yes! Though this is the "Works For Me (alpha release)" version.
Keep in mind:
* It's not cabalized yet, so... we use my quick-and-dirty build scripts to build/clean.
* It's throughput runs at about 800KB/s over Wi-Fi (i should be able to get this faster).
* Depends on the Data.Binary (binary)
* Depends on Network.Socket.ByteString (network-bytestring)
* Requires that you have the tun module loaded (make sure the /dev/net/tun device exists)
* Needs to run as root (do you trust me?)
* UDP port is fixed at 24999 for now (remember, WFM alpha release)
* It uses a C file to do the ioctls and setup the IP address, MTU, etc... (any one able to see a way to remove the C file? It's not doing anything all that complex...)
Here's how to use it:
sudo ./haskvpn [my vpn ip] [address to bind to] [address to connect to]
Here's any example:
# On machine 1
sudo ./haskvpn
10.0.0.1 0.0.0.0 192.168.128.60
# On machine 2
sudo ./haskvpn
10.0.0.2 0.0.0.0 192.168.128.50Once that comes up, you should be able to ping, ssh, etc from
10.0.0.1 to
10.0.0.2 and back again.
The code is here:
http://sw17ch.com/code/haskvpn-1223320484.tar.gzOnce the code is downloaded, run ./build.sh and you (should) find the haskvpn binary in the same directory.
There are 338 lines of haskell/c (including comments/whitespace), so it shouldn't take too long to read over.
Reccomendations/patches/insults are requested!
--
/jve