added unchanged stuff

This commit is contained in:
akilan
2021-01-09 19:42:53 +04:00
parent d329a26083
commit a71905d698
12 changed files with 31 additions and 0 deletions

0
.gitignore vendored Normal file → Executable file
View File

0
Makefile Normal file → Executable file
View File

0
README Normal file → Executable file
View File

0
client/client.go Normal file → Executable file
View File

0
client/list-servers.go Normal file → Executable file
View File

0
dissertation-1.pdf Normal file → Executable file
View File

0
docs/Installation.txt Normal file → Executable file
View File

0
go.mod Normal file → Executable file
View File

0
go.sum Normal file → Executable file
View File

0
server/container.go Normal file → Executable file
View File

31
server/ipfs-ssh.sh Normal file
View File

@@ -0,0 +1,31 @@
#!/usr/bin/env bash
#Implementation from (https://gist.github.com/Kubuxu/0cafd6dc71114349875827c2c379fa1f)
REMOTE_HOST=${1-"YOUR REMOTE HOST HERE"}
DEFAULT_API_FILE="$HOME/.ipfs/api"
API_FILE="${IPFS_PATH-$DEFAULT_API_FILE}"
if [ -e "$API_FILE" ]; then
echo "IPFS API is already running"
exit 1
fi
PORT=5001
ssh -N -L ${PORT}:localhost:5001 $REMOTE_HOST &
SSH_PID=$!
function cleanupAndExit() {
rm -f "$API_FILE"
echo
echo "Killing ssh."
kill "$SSH_PID"
exit
}
trap cleanupAndExit INT
printf "/ip4/127.0.0.1/tcp/$PORT" > "$API_FILE"
echo "Linked local API to $REMOTE_HOST."
wait $SSH_PID
rm -f "$API_FILE"

0
server/server.go Normal file → Executable file
View File