Skip to content

Instantly share code, notes, and snippets.

@fortuna
Last active May 8, 2023 09:35
Show Gist options
  • Save fortuna/78d2c5c340e47c0f0e06afdeca866421 to your computer and use it in GitHub Desktop.
Save fortuna/78d2c5c340e47c0f0e06afdeca866421 to your computer and use it in GitHub Desktop.

Revisions

  1. fortuna revised this gist May 4, 2023. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion example.sh
    Original file line number Diff line number Diff line change
    @@ -2,5 +2,5 @@
    # Example practical usage at https://github.com/pypi/support/issues/2751#issuecomment-1535248888

    mkfifo in.fifo
    nc -l 8443 < in.fifo | { dd bs=100 count=1; sleep 0.1; cat; } | nc files.pythonhosted.org 443 > in.fifo &
    nc -l localhost 8443 < in.fifo | { dd bs=100 count=1; sleep 0.1; cat; } | nc files.pythonhosted.org 443 > in.fifo &
    time curl --connect-to ::localhost:8443 'https://files.pythonhosted.org/packages/84/a9/2bf119f3f9cff1f376f924e39cfae18dec92a1514784046d185731301281/scipy-1.10.1.tar.gz' > /dev/null
  2. fortuna revised this gist May 4, 2023. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion example.sh
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,5 @@
    # Author: Vinicius Fortuna
    # Example usage at https://github.com/pypi/support/issues/2751#issuecomment-1535248888
    # Example practical usage at https://github.com/pypi/support/issues/2751#issuecomment-1535248888

    mkfifo in.fifo
    nc -l 8443 < in.fifo | { dd bs=100 count=1; sleep 0.1; cat; } | nc files.pythonhosted.org 443 > in.fifo &
  3. fortuna revised this gist May 4, 2023. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion example.sh
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,5 @@
    # See https://github.com/pypi/support/issues/2751#issuecomment-1535248888
    # Author: Vinicius Fortuna
    # Example usage at https://github.com/pypi/support/issues/2751#issuecomment-1535248888

    mkfifo in.fifo
    nc -l 8443 < in.fifo | { dd bs=100 count=1; sleep 0.1; cat; } | nc files.pythonhosted.org 443 > in.fifo &
  4. fortuna created this gist May 4, 2023.
    5 changes: 5 additions & 0 deletions example.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,5 @@
    # See https://github.com/pypi/support/issues/2751#issuecomment-1535248888

    mkfifo in.fifo
    nc -l 8443 < in.fifo | { dd bs=100 count=1; sleep 0.1; cat; } | nc files.pythonhosted.org 443 > in.fifo &
    time curl --connect-to ::localhost:8443 'https://files.pythonhosted.org/packages/84/a9/2bf119f3f9cff1f376f924e39cfae18dec92a1514784046d185731301281/scipy-1.10.1.tar.gz' > /dev/null