Skip to content

Instantly share code, notes, and snippets.

@trinitronx
Last active April 26, 2018 00:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save trinitronx/6427d6454fb3b121fc2ab5ca7ac766bc to your computer and use it in GitHub Desktop.
Save trinitronx/6427d6454fb3b121fc2ab5ca7ac766bc to your computer and use it in GitHub Desktop.
Docker SOCKS5h Proxy Diagram

docker-socks5h-diagram.svg

ASCII art diagram for docker networking proxy setup. SVG file diagram generated from ditaa tool.

How to Generate from source & view

git clone https://gist.github.com/6427d6454fb3b121fc2ab5ca7ac766bc.git docker-socks5h-diagram.svg
cd ./docker-socks5h-diagram.svg
brew install ditaa
ditaa --transparent --verbose --no-separation --svg  ./docker-ditaa-diagram.md ./docker-diagram.svg
# Look at output SVG file with an SVG viewer:
# Note: This assumes you have set up default application for .svg files!
open ./docker-diagram.svg
/---------------------------------------------------\           +---------------------+      +--------------+
|                                                   |           | Bastion Host        |      | VPC          |
| cAAA                                              |           |  /-------\      /---|<---->|---\          |
| Mac OSX                                           |           |  | cEB0  |      |   |      |   |          |
| Laptop                                            |           |  |       |      |   |      |   |          |
|                                                   |           |  |       |      |   |      |   ^          |
|              /---------------------------------\  |           |  |       |      ^   |      |  /---------\ |
|              | cEB0                            |  |           |  |       |   DNS    |      |  | cE73    | |
|              | SSH Tunnel                      |  |           |  |       |   Lookup |      |  | Route53 | |
|              |                                 |  |           |  |       |      |   |      |  |         | |
|              |  -=-> (alias IP)꞉(port) >--=----|--|-----=---->|=-| SSHd  |-=--------|<-=-->|  \---------/ |
|              | ⎛                               |  |           |  |       |          |      |              |
|              | :                               |  |           |  \-------/          |      |              |
|              \---------------------------------/  |           |                     |      |              |
|      /--------------------------------------------/           |                     |      |              |
|      |         ^                                              +---------------------+      +--------------+
|      |         |                                   
|      | /------------------------------------------\
|      | | c1BE  |       ╌net꞊(bridgenet)           |
|      | |                                          |
|      | | ALL_PROXY꞊socks5h꞉//(alias IP)꞉(port)    |
|      | |                                          |
|      | | Terraform                                |
|      | | Docker                                   |
|      | | Container                                |
\------/ \------------------------------------------/
Display the source blob
Display the rendered blob
Raw
<?xml version='1.0' encoding='UTF-8' standalone='no'?>
<svg
xmlns='http://www.w3.org/2000/svg'
width='1170'
height='434'
shape-rendering='geometricPrecision'
version='1.0'>
<defs>
<filter id='f2' x='0' y='0' width='200%' height='200%'>
<feOffset result='offOut' in='SourceGraphic' dx='5' dy='5' />
<feGaussianBlur result='blurOut' in='offOut' stdDeviation='3' />
<feBlend in='SourceGraphic' in2='blurOut' mode='normal' />
</filter>
</defs>
<g stroke-width='1' stroke-linecap='square' stroke-linejoin='round'>
<path stroke='gray' fill='gray' filter='url(#f2)' d='M65.0 392.0 Q65.0 399.0 70.0 399.0 L130.0 399.0 Q135.0 399.0 135.0 392.0 L135.0 252.0 L135.0 252.0 Q135.0 245.0 140.0 245.0 L580.0 245.0 L580.0 245.0 Q585.0 245.0 585.0 238.0 L585.0 56.0 L585.0 56.0 Q585.0 49.0 580.0 49.0 L70.0 49.0 L70.0 49.0 Q65.0 49.0 65.0 56.0 L65.0 392.0 z' />
<path stroke='gray' fill='gray' filter='url(#f2)' d='M580.0 287.0 Q585.0 287.0 585.0 294.0 L585.0 392.0 Q585.0 399.0 580.0 399.0 L160.0 399.0 L160.0 399.0 Q155.0 399.0 155.0 392.0 L155.0 294.0 L155.0 294.0 Q155.0 287.0 160.0 287.0 L580.0 287.0 z' />
<path stroke='gray' fill='gray' filter='url(#f2)' d='M705.0 259.0 L925.0 259.0 L925.0 49.0 L705.0 49.0 z' />
<path stroke='gray' fill='gray' filter='url(#f2)' d='M215.0 224.0 Q215.0 231.0 220.0 231.0 L550.0 231.0 Q555.0 231.0 555.0 224.0 L555.0 140.0 L555.0 140.0 Q555.0 133.0 550.0 133.0 L220.0 133.0 L220.0 133.0 Q215.0 133.0 215.0 140.0 L215.0 224.0 z' />
<path stroke='gray' fill='gray' filter='url(#f2)' d='M995.0 49.0 L995.0 259.0 L1145.0 259.0 L1145.0 49.0 z' />
<path stroke='gray' fill='gray' filter='url(#f2)' d='M735.0 84.0 Q735.0 77.0 740.0 77.0 L810.0 77.0 Q815.0 77.0 815.0 84.0 L815.0 210.0 L815.0 210.0 Q815.0 217.0 810.0 217.0 L740.0 217.0 L740.0 217.0 Q735.0 217.0 735.0 210.0 L735.0 84.0 z' />
<path stroke='gray' fill='gray' filter='url(#f2)' d='M1030.0 133.0 Q1025.0 133.0 1025.0 140.0 L1025.0 182.0 Q1025.0 189.0 1030.0 189.0 L1120.0 189.0 L1120.0 189.0 Q1125.0 189.0 1125.0 182.0 L1125.0 140.0 L1125.0 140.0 Q1125.0 133.0 1120.0 133.0 L1030.0 133.0 z' />
<path stroke='#000000' stroke-width='1.000000' stroke-linecap='round' stroke-linejoin='round' fill='#aaaaaa' d='M65.0 392.0 Q65.0 399.0 70.0 399.0 L130.0 399.0 Q135.0 399.0 135.0 392.0 L135.0 252.0 L135.0 252.0 Q135.0 245.0 140.0 245.0 L580.0 245.0 L580.0 245.0 Q585.0 245.0 585.0 238.0 L585.0 56.0 L585.0 56.0 Q585.0 49.0 580.0 49.0 L70.0 49.0 L70.0 49.0 Q65.0 49.0 65.0 56.0 L65.0 392.0 z' />
<path stroke='#000000' stroke-width='1.000000' stroke-linecap='round' stroke-linejoin='round' fill='#11bbee' d='M580.0 287.0 Q585.0 287.0 585.0 294.0 L585.0 392.0 Q585.0 399.0 580.0 399.0 L160.0 399.0 L160.0 399.0 Q155.0 399.0 155.0 392.0 L155.0 294.0 L155.0 294.0 Q155.0 287.0 160.0 287.0 L580.0 287.0 z' />
<path stroke='#000000' stroke-width='1.000000' stroke-linecap='round' stroke-linejoin='round' fill='white' d='M705.0 259.0 L925.0 259.0 L925.0 49.0 L705.0 49.0 z' />
<path stroke='#000000' stroke-width='1.000000' stroke-linecap='round' stroke-linejoin='round' fill='#eebb00' d='M215.0 224.0 Q215.0 231.0 220.0 231.0 L550.0 231.0 Q555.0 231.0 555.0 224.0 L555.0 140.0 L555.0 140.0 Q555.0 133.0 550.0 133.0 L220.0 133.0 L220.0 133.0 Q215.0 133.0 215.0 140.0 L215.0 224.0 z' />
<path stroke='#000000' stroke-width='1.000000' stroke-linecap='round' stroke-linejoin='round' fill='white' d='M995.0 49.0 L995.0 259.0 L1145.0 259.0 L1145.0 49.0 z' />
<path stroke='#000000' stroke-width='1.000000' stroke-linecap='round' stroke-linejoin='round' fill='#eebb00' d='M735.0 84.0 Q735.0 77.0 740.0 77.0 L810.0 77.0 Q815.0 77.0 815.0 84.0 L815.0 210.0 L815.0 210.0 Q815.0 217.0 810.0 217.0 L740.0 217.0 L740.0 217.0 Q735.0 217.0 735.0 210.0 L735.0 84.0 z' />
<path stroke='#000000' stroke-width='1.000000' stroke-linecap='round' stroke-linejoin='round' fill='#ee7733' d='M1030.0 133.0 Q1025.0 133.0 1025.0 140.0 L1025.0 182.0 Q1025.0 189.0 1030.0 189.0 L1120.0 189.0 L1120.0 189.0 Q1125.0 189.0 1125.0 182.0 L1125.0 140.0 L1125.0 140.0 Q1125.0 133.0 1120.0 133.0 L1030.0 133.0 z' />
<path stroke='#000000' stroke-width='1.000000' stroke-linecap='round' stroke-linejoin='round' fill='none' d='M885.0 133.0 L885.0 84.0 Q885.0 77.0 890.0 77.0 L915.0 77.0 L915.0 77.0 ' />
<path stroke='#000000' stroke-width='1.000000' stroke-linecap='round' stroke-linejoin='round' fill='none' d='M1035.0 119.0 L1035.0 84.0 Q1035.0 77.0 1030.0 77.0 L1005.0 77.0 L1005.0 77.0 ' />
<path stroke='none' stroke-width='1.000000' stroke-linecap='round' stroke-linejoin='round' fill='#000000' d='M940.0 70.0 L930.0 77.0 L940.0 84.0 z' />
<path stroke='none' stroke-width='1.000000' stroke-linecap='round' stroke-linejoin='round' fill='#000000' d='M980.0 70.0 L990.0 77.0 L980.0 84.0 z' />
<path stroke='none' stroke-width='1.000000' stroke-linecap='round' stroke-linejoin='round' fill='#000000' d='M1035.0 112.0 L1030.0 126.0 L1040.0 126.0 z' />
<path stroke='none' stroke-width='1.000000' stroke-linecap='round' stroke-linejoin='round' fill='#000000' d='M885.0 126.0 L880.0 140.0 L890.0 140.0 z' />
<path stroke='none' stroke-width='1.000000' stroke-linecap='round' stroke-linejoin='round' fill='#000000' d='M270.0 182.0 L280.0 189.0 L270.0 196.0 z' />
<path stroke='none' stroke-width='1.000000' stroke-linecap='round' stroke-linejoin='round' fill='#000000' d='M470.0 182.0 L480.0 189.0 L470.0 196.0 z' />
<path stroke='none' stroke-width='1.000000' stroke-linecap='round' stroke-linejoin='round' fill='#000000' d='M690.0 182.0 L700.0 189.0 L690.0 196.0 z' />
<path stroke='none' stroke-width='1.000000' stroke-linecap='round' stroke-linejoin='round' fill='#000000' d='M940.0 182.0 L930.0 189.0 L940.0 196.0 z' />
<path stroke='none' stroke-width='1.000000' stroke-linecap='round' stroke-linejoin='round' fill='#000000' d='M980.0 182.0 L990.0 189.0 L980.0 196.0 z' />
<path stroke='none' stroke-width='1.000000' stroke-linecap='round' stroke-linejoin='round' fill='#000000' d='M235.0 252.0 L230.0 266.0 L240.0 266.0 z' />
<path stroke='#000000' stroke-width='1.000000' stroke-linecap='round' stroke-linejoin='round' fill='none' d='M235.0 294.0 L235.0 307.0 ' />
<path stroke='#000000' stroke-width='1.000000' stroke-linecap='round' stroke-linejoin='round' fill='none' d='M235.0 259.0 L235.0 279.0 ' />
<path stroke='#000000' stroke-width='1.000000' stroke-linecap='round' stroke-linejoin='round' fill='none' d='M885.0 168.0 L885.0 181.0 ' />
<path stroke='#000000' stroke-width='1.000000' stroke-dasharray='5.000000,5.000000' stroke-miterlimit='0' stroke-linecap='butt' stroke-linejoin='round' fill='white' d='M245.0 189.0 L275.0 189.0 ' />
<path stroke='#000000' stroke-width='1.000000' stroke-linecap='round' stroke-linejoin='round' fill='none' d='M575.0 189.0 L565.0 189.0 ' />
<path stroke='#000000' stroke-width='1.000000' stroke-dasharray='5.000000,5.000000' stroke-miterlimit='0' stroke-linecap='butt' stroke-linejoin='round' fill='white' d='M545.0 189.0 L475.0 189.0 ' />
<path stroke='#000000' stroke-width='1.000000' stroke-dasharray='5.000000,5.000000' stroke-miterlimit='0' stroke-linecap='butt' stroke-linejoin='round' fill='white' d='M595.0 189.0 L695.0 189.0 ' />
<path stroke='#000000' stroke-width='1.000000' stroke-dasharray='5.000000,5.000000' stroke-miterlimit='0' stroke-linecap='butt' stroke-linejoin='round' fill='white' d='M915.0 189.0 L825.0 189.0 ' />
<path stroke='#000000' stroke-width='1.000000' stroke-dasharray='5.000000,5.000000' stroke-miterlimit='0' stroke-linecap='butt' stroke-linejoin='round' fill='white' d='M725.0 189.0 L715.0 189.0 ' />
<path stroke='#000000' stroke-width='1.000000' stroke-dasharray='5.000000,5.000000' stroke-miterlimit='0' stroke-linecap='butt' stroke-linejoin='round' fill='white' d='M935.0 189.0 L985.0 189.0 ' />
<path stroke='#000000' stroke-width='1.000000' stroke-linecap='round' stroke-linejoin='round' fill='none' d='M985.0 77.0 L935.0 77.0 ' />
<text x='213' y='334' font-family='Courier' font-size='15' stroke='none' fill='#000000' ><![CDATA[ALL_PROXY꞊socks5h꞉//(alias IP)꞉(port)]]></text>
<text x='170' y='362' font-family='Courier' font-size='15' stroke='none' fill='#000000' ><![CDATA[Terraform]]></text>
<text x='170' y='376' font-family='Courier' font-size='15' stroke='none' fill='#000000' ><![CDATA[Docker]]></text>
<text x='170' y='390' font-family='Courier' font-size='15' stroke='none' fill='#000000' ><![CDATA[Container]]></text>
<text x='80' y='96' font-family='Courier' font-size='15' stroke='none' fill='#ffffff' ><![CDATA[Mac OSX]]></text>
<text x='80' y='110' font-family='Courier' font-size='15' stroke='none' fill='#ffffff' ><![CDATA[Laptop]]></text>
<text x='329' y='306' font-family='Courier' font-size='15' stroke='none' fill='#000000' ><![CDATA[╌net꞊(bridgenet)]]></text>
<text x='238' y='166' font-family='Courier' font-size='15' stroke='none' fill='#000000' ><![CDATA[SSH Tunnel]]></text>
<text x='320' y='194' font-family='Courier' font-size='15' stroke='none' fill='#000000' ><![CDATA[(alias IP)꞉(port)]]></text>
<text x='230' y='208' font-family='Courier' font-size='15' stroke='none' fill='#000000' ><![CDATA[⎛ ]]></text>
<text x='752' y='194' font-family='Courier' font-size='15' stroke='none' fill='#000000' ><![CDATA[SSHd]]></text>
<text x='733' y='68' font-family='Courier' font-size='15' stroke='none' fill='#000000' ><![CDATA[Bastion Host]]></text>
<text x='850' y='152' font-family='Courier' font-size='15' stroke='none' fill='#000000' ><![CDATA[DNS]]></text>
<text x='850' y='166' font-family='Courier' font-size='15' stroke='none' fill='#000000' ><![CDATA[Lookup]]></text>
<text x='1044' y='166' font-family='Courier' font-size='15' stroke='none' fill='#000000' ><![CDATA[Route53]]></text>
<text x='1011' y='68' font-family='Courier' font-size='15' stroke='none' fill='#000000' ><![CDATA[VPC]]></text>
</g>
</svg>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment