forked from axiom-team/astroport
27 lines
931 B
Bash
Executable File
27 lines
931 B
Bash
Executable File
#!/bin/bash
|
|
################################################################################
|
|
# Author: Fred (support@qo-op.com)
|
|
# Version: 0.1
|
|
# License: AGPL-3.0 (https://choosealicense.com/licenses/agpl-3.0/)
|
|
################################################################################
|
|
# Activate SUPPORT MODE: open ssh over IPFS
|
|
MY_PATH="`dirname \"$0\"`" # relative
|
|
MY_PATH="`( cd \"$MY_PATH\" && pwd )`" # absolutized and normalized
|
|
|
|
# TODO ESTABLISH A PORT FORWARD STRATEGY (depending on Node Flavour)
|
|
exit
|
|
|
|
# Arrange local port forwarded to swarm
|
|
# GET _uidna
|
|
|
|
YOU=$(ps aux --sort=+utime | grep ipfs | tail -n 1 | cut -d " " -f 1)
|
|
|
|
IPFSNODEID=$(ipfs id -f='<id>\n')
|
|
UIDNA=$(cat ~/.zen/ipfs/.$IPFSNODEID/G1SSB/_uidna)
|
|
|
|
p2p close --all
|
|
ipfs p2p listen /x/ssh-$UIDNA /ip4/127.0.0.1/tcp/22
|
|
ipfs p2p listen /x/http-$UIDNA /ip4/127.0.0.1/tcp/80
|
|
ipfs p2p listen /x/https-$UIDNA /ip4/127.0.0.1/tcp/443
|
|
ipfs p2p ls
|