160 karma · joined July 2, 2013
A good rule of thumb:
If your bash script is over 100 (sane) lines it's an indication that what you are doing is probably best not done with shell scripts.
But... to each their own.
Let's say we have Alice and Bob, alice wants to have 4 hops both outbound and inbound and Bob wants to have a 2 hop inbound and a 1 hop outbound
Alice's tunnels would be:
Alice -> Participant A1 -> Participant A2 -> Participant A3 -> Outbound Endpoint 1 -> ?
Alice <- Participant A4 <- Participant A5 <- Participant A6 <- Inbound Gateway 1 <- ?
Bob's tunnels would be:
Bob -> Outbound Gateway 2 -> ?
Bob <- Participant B1 <- Inbound Gateway 2 <- ?
For Alice to send to Bob and receive a reply the round trip path of the message would take would be
Alice -> PA1 -> PA2 -> PA3 -> OBEP1 -> IBGW2 -> PB1 -> Bob -> OBEP2 -> IBGW1 -> PA6 -> PA5 -> PA4 -> Alice