fob
fob copied to clipboard
USB over IP
fob
USB over IP
Setup USB server on LAN
USB Server Setup (Raspberry Pi, ARM, VirtualHere)
-
wget http://www.virtualhere.com/sites/default/files/usbserver/vhusbdarm
-
chmod +x ./vhusbdarm
-
sudo ./vhusbddarm
- USB Devices can now be reached
Make persistant
- Open
crontab
as rootsudo crontab -e
- Add entry
@reboot /path/to/vhusbdarm
USB Client Setup (CLI, Linux, VirtualHere -- Fixme free version, no daemon support)
macOS
- Download macOS installer from VirtualHere
- VirtualHere Client should automatically detect server
Windows
- Download Windows installer from VirtualHere
- Run
vhui64.exe
- Right click Hubs, Specify Hubs
- Enter in IP address of the server and port (7575)
- e.g. 192.168.0.104:7575
Linux
-
mkdir vhclient && cd vhclient
-
wget http://virtualhere.com/sites/default/files/usbclient/vhclientx86_64
-
chmod +x vhclientx86_64
-
sudo ./vhclientx86_64 &
Interact as normal user
-
./vhclientx86_64 -t "MANUAL HUB ADD,HOSTNAME:PORT"
#####FIXME ##### -
./vhclientx86_64 -t "LIST"
-
./vhclientx86_64 -t "USE,device.num"
#####FIXME ##### - Should say "OK". Device will now list in USB devices
- Once device is done being used:
./vhclientx86_64 -t "STOP USING,device.num"
#####FIXME #####
USB Client Setup (GUI, Windows, VirtualHere)
- Install cilent here
- To connect to WAN (Windows):
- Right Click, Specify Hubs, Add
- Type in
HOST:PORT
#####FIXME #####
WAN Configuration
Dynamic DNS Update (CLI, Linux, DuckDNS)
-
mkdir duckdns && cd duckdns
-
vi duck.sh
- Add the line: #####FIXME #####
echo url=”https://www.duckdns.org/update?domains=DOMAIN&token=TOKEN&ip=” | curl -k -o ~/duckdns/duck.log -K -
-
domains=DOMAINS
provided by duckdns -
token=TOKEN
provided by duckdns -
ip=
is to be an empty string, duckdns automatically detects client's IP address if left empty
-
chmod 700 duck.sh
- Test the script
-
./duck.sh
-
cat duck.log
should only contain the word "OK"
- Create a cronjob to run the script every 5 minutes:
-
crontab -e
-
*/5 * * * * ~/duckdns/duck.sh >/dev/null 2>&1
Setup Auth
Virtual Here documentation can be found here
- Make sure
./vhusbddarm
is not running before editingconfig.ini
-
sudo vi config.ini
- Add the line:
clientAuthorization=/home/pi/auth.sh “$PASSWORD$”
-
vi auth.sh
to create a script - Add: ######FIXME ######
#!/bin/bash
# Example script for performing basic user authorization for virtualhere
# Also includes a simple password protection mechanism for accessing a device
# Return 2 if the user needs to provide a password (or the password is incorrec$
# Return 1 if the user is allowed to access this device
# Return 0 if the user is not allowed to access this device
# Parameters are passed in as:
# $1 = PASSWORD
logger "Authorizing -> '$1'"
# "mypassword" = " " as an MD5 hash
if [ "$6" == " " ]; then
logger "Authorized!"
exit 1
else
exit 2
fi
Setup SSL
https://www.virtualhere.com/ssl_setup