mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2025-04-30 07:05:06 +03:00
1. added multipath protocol and schema suport
2. added SCTP protocol and schema support 3. added set of NAS models support (Asustor, ReadyNAS, Drobo, QNAP, WD, Synology, Terramaster) 4. moved to fc00::/7 private segment 5. added Windows, MacOS and Linux UI for peers edit and current status
This commit is contained in:
parent
cfa293d189
commit
d8a4000141
198 changed files with 8589 additions and 697 deletions
7
contrib/ui/nas-qnap/au/var/lib/mesh/hooks/deviceinfo
Normal file
7
contrib/ui/nas-qnap/au/var/lib/mesh/hooks/deviceinfo
Normal file
|
@ -0,0 +1,7 @@
|
|||
#!/bin/sh
|
||||
CFG=/etc/default_config/uLinux.conf
|
||||
echo vendor=QNAP
|
||||
echo vendorOperatingSystemName=$(/sbin/getcfg System OS -f $CFG)
|
||||
echo firmwareVersion=$(/sbin/getcfg System Version -f $CFG)
|
||||
echo model=$(/sbin/getcfg System Model -f $CFG)
|
||||
echo serial=$(/sbin/get_hwsn)
|
31
contrib/ui/nas-qnap/au/var/lib/mesh/hooks/webauth
Normal file
31
contrib/ui/nas-qnap/au/var/lib/mesh/hooks/webauth
Normal file
|
@ -0,0 +1,31 @@
|
|||
#!/bin/sh
|
||||
#we want read:
|
||||
#export HTTP_COOKIE='qnapuser=admin; qnappwd=L4edNyoCC15.kDBLIN05480'
|
||||
|
||||
IFS=';'
|
||||
for x in $HTTP_COOKIE
|
||||
do
|
||||
eval $x
|
||||
done
|
||||
[ -z ${qnapuser} ] && exit 1
|
||||
[ -z ${qnappwd} ] && exit 1
|
||||
|
||||
#exit with zero status on auth success
|
||||
#2-pass auth
|
||||
S=$(curl -s -k -L "http://127.0.0.1:58080/cgi-bin/authLogin.cgi?user=${qnapuser}&pwd=${qnappwd}" | tr -d '\040\011\012\015' | grep -F '<authPassed><![CDATA[1]]></authPassed>')
|
||||
[ ! 0 -eq ${#S} ] && exit 0
|
||||
|
||||
AUTH_PORT=$(cat /etc/apache-sys-proxy.conf | grep Listen | awk '{print $2}')
|
||||
if [ -n $AUTH_PORT ] ; then
|
||||
AUTH_PORT=8080
|
||||
fi
|
||||
|
||||
S=$(curl -s -k -L "http://127.0.0.1:${AUTH_PORT}/cgi-bin/authLogin.cgi?user=${qnapuser}&pwd=${qnappwd}" | tr -d '\040\011\012\015' | grep -F '<authPassed><![CDATA[1]]></authPassed>')
|
||||
[ ! 0 -eq ${#S} ] && exit 0
|
||||
|
||||
#fallback to plain password auth
|
||||
#decode password first
|
||||
plain_pwd=$(openssl enc -base64 -d <<< ${qnappwd})
|
||||
[ -z $plain_pwd ] && exit 1
|
||||
S=$(curl -s -k -L "http://127.0.0.1:${AUTH_PORT}/cgi-bin/authLogin.cgi?user=${qnapuser}&plain_pwd=${plain_pwd}" | tr -d '\040\011\012\015' | grep -F '<authPassed><![CDATA[1]]></authPassed>')
|
||||
[ 0 -eq ${#S} ] && exit 1 || exit 0
|
Loading…
Add table
Add a link
Reference in a new issue