Browse Source

.$IPFSNODEID/x_ssh-$zuid.sh

pull/34/head
fred 3 months ago
parent
commit
47021af263
  1. 3
      zen/ipfs_P2P_forward.sh

3
zen/ipfs_P2P_forward.sh

@ -72,8 +72,7 @@ ipfs p2p ls
## ipfs cat /ipns/$IPFSNODEID/.$IPFSNODEID/x_ssh-$zuid.sh | bash
rm ~/.zen/ipfs/.$IPFSNODEID/x_ssh-$zuid.sh ## DEBUG
if [[ ! -f ~/.zen/ipfs/.$IPFSNODEID/x_ssh-$zuid.sh ]]; then
echo "echo 'Choix du port local pour ssh-$zuid ?'; read PORT; [[ ! \$(ipfs p2p ls | grep x/ssh-$zuid) ]] && ipfs --timeout=5s ping -n 1 /p2p/$IPFSNODEID && ipfs p2p forward /x/ssh-$zuid /ip4/127.0.0.1/tcp/\$PORT /p2p/$IPFSNODEID" > ~/.zen/ipfs/.$IPFSNODEID/x_ssh-$zuid.sh
echo "ssh $YOU@127.0.0.1 -p \$PORT" >> ~/.zen/ipfs/.$IPFSNODEID/x_ssh-$zuid.sh
echo "echo 'Choix du port local pour ssh-$zuid ?'; read PORT; [[ ! \$(ipfs p2p ls | grep x/ssh-$zuid) ]] && ipfs --timeout=5s ping -n 1 /p2p/$IPFSNODEID && ipfs p2p forward /x/ssh-$zuid /ip4/127.0.0.1/tcp/\$PORT /p2p/$IPFSNODEID && ssh $YOU@127.0.0.1 -p \$PORT" > ~/.zen/ipfs/.$IPFSNODEID/x_ssh-$zuid.sh
fi
## THIS PORT FORWARDING HUB COULD BE MADE MORE CONTROLABLE USING FRIENDSHIP LEVEL & IPFS BALISES

Loading…
Cancel
Save