Open changchichung opened 3 years ago
Download a keygen for your platform:
https://github.com/andreimarcu/linx-server/releases/download/v2.3.8/linx-genkey-v2.3.8_linux-amd64 https://github.com/andreimarcu/linx-server/releases/download/v2.3.8/linx-genkey-v2.3.8_linux-arm64 https://github.com/andreimarcu/linx-server/releases/download/v2.3.8/linx-genkey-v2.3.8_linux-arm
I used AMD version on my PC. It was a pain to run it inside the container. Make executable and run ./linx-genkey*
Type password and copy result into auth.txt as a new line.
You might also want to track these hashes somewhere else in case you want to remove certain ones after.
API keys are same as authfile? Or I need to set it on some other location?
As API ill use the same password I use for basic auth? Or the hash?
Yes. No. Yes. No.
authfile.txt is the file to keep all the API tokens that genkey generates.
You can use this to generate new tokens:
echo 'ABC' | ./linx-genkey-v2.3.8_linux-amd64 | awk -F ' ' '{print $5}'
You can use the ABC key on the basic web GUI auth and using CLI:
curl -k -H "Linx-Api-Key: ABC" -T $1 https\://linx-share-url.com\:port/upload/
Hashes are to be kept as a secret.
Btw I made my authfile.txt using this command:
while true; do shuf -n 1 hashes.txt | ./linx-genkey-v2.3.8_linux-arm64 | awk -F ' ' '{print $5}'; done | tee authfile.txt
The hashes.txt I generated using
`
import os
while True: try: gen = lambda x: os.urandom(x).hex() print(gen(9)) except BrokenPipeError: continue ` This python code
I did something similar using bitwarden cli
for k in {1..10}
do
pass=$(bw generate -p --words 3)
hash=$(echo $pass | ./linx-genkey-v2.3.8_linux-amd64 | awk -F ' ' '{print $5}')
echo -e $pass' '$hash
done
I run linx-server in docker , I can upload in web UI now . but I can not find API key or instructions about how to add keys. so , where can I find/set the API keys?