{"id":13825936,"url":"https://github.com/corsis/portfusion","last_synced_at":"2025-10-03T20:15:03.152Z","repository":{"id":2861616,"uuid":"3866545","full_name":"corsis/PortFusion","owner":"corsis","description":"Haskell-powered cross-platform transport-layer distributed reverse / forward proxy \u0026 tunneling solution – currently available for all TCP protocols (RDP, VNC, HTTP(S), SSH, ...).","archived":false,"fork":false,"pushed_at":"2016-08-01T06:30:09.000Z","size":725,"stargazers_count":192,"open_issues_count":10,"forks_count":41,"subscribers_count":32,"default_branch":"master","last_synced_at":"2024-11-30T19:38:15.582Z","etag":null,"topics":["application","gplv3","haskell","multi-platform","proxy","reverse-proxy","simple","tcp"],"latest_commit_sha":null,"homepage":"http://fusion.corsis.tech","language":"Haskell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/corsis.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-03-29T13:56:59.000Z","updated_at":"2024-08-30T04:03:06.000Z","dependencies_parsed_at":"2022-09-08T12:24:06.533Z","dependency_job_id":null,"html_url":"https://github.com/corsis/PortFusion","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/corsis%2FPortFusion","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/corsis%2FPortFusion/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/corsis%2FPortFusion/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/corsis%2FPortFusion/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/corsis","download_url":"https://codeload.github.com/corsis/PortFusion/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230445926,"owners_count":18227060,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["application","gplv3","haskell","multi-platform","proxy","reverse-proxy","simple","tcp"],"created_at":"2024-08-04T09:01:29.470Z","updated_at":"2025-10-03T20:14:58.116Z","avatar_url":"https://github.com/corsis.png","language":"Haskell","funding_links":[],"categories":["\u003ca id=\"01e6651181d405ecdcd92a452989e7e0\"\u003e\u003c/a\u003e工具"],"sub_categories":["\u003ca id=\"9d6789f22a280f5bb6491d1353b02384\"\u003e\u003c/a\u003e隧道\u0026\u0026穿透"],"readme":"![pf]\n[pf]: http://fusion.corsis.tech/i/h.png \"PortFusion\"\n\n### \u003ca href='http://sourceforge.net/projects/portfusion/files/1.2.1/#files'\u003e\u003cimg src='http://fusion.corsis.tech/i/down_16.png' /\u003e Download 1.2.1\u003c/a\u003e \u003cspan style=\"font-size: small\"\u003e(for Windows, Linux, OS X and FreeBSD, ...)\u003c/span\u003e\n\n---\n\nPortFusion is a minimalistic, cross-platform, transport-layer distributed\nreverse / forward proxy and tunneling solution for TCP released under\n[GPLv3](#license).\n\nA single package that makes the most of each platform by tapping into their\nunique capabilities, combining this power with an intuitive interface, beautiful\ndesign and [Haskell]'s excellent support for unprecedented levels of concurrency\nand parallelism.\n\nIt strives for the smallest source code size while delivering maximum throughput\nwith near-zero overhead.\n\n---\n[Today, a growing number of companies and institutions around the world use PortFusion.](https://github.com/corsis/PortFusion/wiki/Users)\n\n---\n\n## Use\n\nPortFusion is a tiny command line application.\n\n| Distributed Reverse Proxy Mode  | Distributed Forward Proxy Mode |\n|:--------------------------------|:-------------------------------|\n| |\n| \u003cp\u003eWork from home using [remote desktop services](http://en.wikipedia.org/wiki/Remote_Desktop_Services) circumventing corporate firewalls.\u003c/p\u003e | \u003cp\u003eConnect to the internet through a http proxy via a gateway to a friend's intranet.\u003c/p\u003e\n| |\n| `↓ home ↓` \u003cpre\u003ePortFusion                ] 2000      [\u003c/pre\u003e\u003cpre\u003ePortFusion 3389 localhost - 2000 home [ 3389\u003c/pre\u003e `↑ work ↑` | `↓ friend ↓` \u003cpre\u003ePortFusion      ]        2000 [\u003c/pre\u003e\u003cpre\u003ePortFusion 3128 ] friend 2000 - server 3128\u003c/pre\u003e `↑ you ↑`\n| |\n| \u003cp\u003eConnections to `home:3389` will now be tunnelled and reach `work:3389`.\u003c/p\u003e \u003cp\u003eYou only need to make `home:2000` accessible from work.\u003c/p\u003e | \u003cp\u003eConnections to `you:3128` will now be tunnelled and reach `server:3128`.\u003c/p\u003e \u003cp\u003eYour friend only needs to make `friend:2000` accessible.\u003c/p\u003e\n| |\n| \u003ca name='illustrate' class='anchor' href='#illustrate' /\u003e [\u003cimg src=\"http://portfusion.sourceforge.net/w/wp-content/uploads/2012/05/dr1.png\" /\u003e](http://portfusion.sourceforge.net/w/wp-content/uploads/2012/05/dr1.png) | [\u003cimg src=\"http://portfusion.sourceforge.net/w/wp-content/uploads/2012/05/df2.png\" /\u003e](http://portfusion.sourceforge.net/w/wp-content/uploads/2012/05/df2.png)\n| |\n| [\u003cimg width='100%' src=\"http://portfusion.sourceforge.net/i/reverse-fusion-msc-8.png\" alt=\"DR\" /\u003e](http://portfusion.sourceforge.net/i/reverse-fusion-msc-8.png) | [\u003cimg width='100%' src=\"http://portfusion.sourceforge.net/i/forward-fusion-msc-8.png\" alt=\"DF\" /\u003e](http://portfusion.sourceforge.net/i/forward-fusion-msc-8.png)\n\n\n## Build\n\n### Prerequisites\n\nYou need only *one* of the following rows for compilation.\n\n| Remarks | OS           | Compilers           |\n|:--------|:-------------|:--------------------|\n| recommended and \u003cbr /\u003e used for official binaries | ![Windows], ![Linux], ![OSX], ![FreeBSD], ![OpenBSD], ![Solaris], ![Other] | [GHC] \u003e= 7.4 \u003cbr /\u003e [LLVM] \u003e= 3\n| easy to install for \u003cbr /\u003e all Haskell newbies    | ![Windows], ![Linux], ![OSX] | [Haskell Platform] \u003e= 2012.2.0.0\n\n### Instructions\n\n```bash\ncabal update\ncabal install    splice\n\ngit   clone      git://github.com/corsis/PortFusion.git -b master\ncd    PortFusion\ncabal configure\ncabal build\n```\n\n### Flags\n\nFollowing flags can be activated when using `cabal configure -f \u003cFLAG\u003e` or `cabal install -f \u003cFLAG\u003e`.\n\n| Flag     | Effect                           | Default | Official Binaries  |\n|:---------|:---------------------------------|:--------|:-------------------|\n|          |                                  |         |\n| `llvm`   | compile via [LLVM]               | `false` | `true`\n| `static` | link system libraries statically | `false` | See [OS and CPUs](wiki/Official-Builds)\n\n\n## Download\n\n### Binaries\n\n| \u003cimg height='48px' alt='CPU' title='CPU' src='http://a.fsdn.com/sd/topics/hardware_64.png' /\u003e | ![Windows]                                                                                    | ![Linux]                                                                                      | ![OSX]                                                                                        | ![FreeBSD]                                                                                    | ![OpenBSD] | ![Solaris] | ![Other]\n| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | ---------- | ---------- | --------\n| x86-64                                                                                        | \u003ca href='http://fusion.corsis.tech'\u003e\u003cimg src='http://fusion.corsis.tech/i/down_16.png' /\u003e Get\u003c/a\u003e | \u003ca href='http://fusion.corsis.tech'\u003e\u003cimg src='http://fusion.corsis.tech/i/down_16.png' /\u003e Get\u003c/a\u003e | \u003ca href='http://fusion.corsis.tech'\u003e\u003cimg src='http://fusion.corsis.tech/i/down_16.png' /\u003e Get\u003c/a\u003e | \u003ca href='http://fusion.corsis.tech'\u003e\u003cimg src='http://fusion.corsis.tech/i/down_16.png' /\u003e Get\u003c/a\u003e | ![C]       | ![C]       | ![C]\n| x86-32                                                                                        | \u003ca href='http://fusion.corsis.tech'\u003e\u003cimg src='http://fusion.corsis.tech/i/down_16.png' /\u003e Get\u003c/a\u003e | \u003ca href='http://fusion.corsis.tech'\u003e\u003cimg src='http://fusion.corsis.tech/i/down_16.png' /\u003e Get\u003c/a\u003e |                                                                                               | ![C]                                                                                          | ![C]       | ![C]       | ![C]\n| [ARM]                                                                                         | ![B]                                                                                          | \u003ca href='http://fusion.corsis.tech'\u003e\u003cimg src='http://fusion.corsis.tech/i/down_16.png' /\u003e Get\u003c/a\u003e | ![C]                                                                                          | ![C]                                                                                          | ![C]       | ![C]       | ![C]\n| [MIPS]                                                                                        |                                                                                               | \u003ca href='https://sourceforge.net/projects/portfusion/files/1.2.1/compressed/'\u003e\u003cimg src='http://fusion.corsis.tech/i/down_16.png' /\u003e Get\u003c/a\u003e |                                                                                               |                                                                                               |            |            |    \n| Other                                                                                         |                                                                                               | ![C]                                                                                          |                                                                                               | ![C]                                                                                          | ![C]       | ![C]       | ![C]\n\nCORSIS Research \u003cbr /\u003e\n![D] builds official binaries \u003cbr /\u003e\n![B] will build official binaries on demand  \u003cbr /\u003e\n![C] can cooperate with community for builds \u003cbr /\u003e\n\n[D]: http://fusion.corsis.tech/i/down_16.png \"Download\"\n[B]: http://res2.windows.microsoft.com/resbox/en/Windows%207/main/33624ed4-7676-4be4-9f47-d77eab7ecd9c_0.gif \"Build-on-Demand\"\n[C]: http://res2.windows.microsoft.com/resbox/en/Windows%207/main/43fa1e85-5152-43ff-b0f7-63ae6520a88b_0.gif \"Coop-on-Demand\"\n\n#### Support\n\nIf you have access to an OS+CPU combination lacking official binaries,\nplease [contact us](#contact) to join our build team!\n\n### Packages\n\n[PortFusion](http://hackage.haskell.org/package/PortFusion) is available and can be very easily installed from [Hackage](http://hackage.haskell.org/package/PortFusion):\n\n````bash\ncabal update\ncabal install splice      -f llvm\ncabal install PortFusion  -f llvm\n````\n\nIf you do not have [LLVM] installed, you can drop `-f llvm`.\n\n\n## Compare\n\n```\nThis is the new Haskell source code repository of the latest ]-[ayabusa version\n– a complete rewrite of the initial Windows-only versions developed in F# / C#.\n```\n\n### What is new in `]-[ayabusa`?\n\nPortFusion          | 1.2.1 – \\]-[ayabusa                                                               | 0.9.3 – old\n--------------------|-----------------------------------------------------------------------------------|-----------------------\nMemory at Start-up  | **~0.7 MB**                                                                       | ~14 MB\nMemory at 1 Fusion  | **~1.0 MB** (constant)                                                            | ~30 MB (lots of jumps)\nOfficial Binaries   | ![Windows], ![Linux], ![OSX], ![FreeBSD]                                          | ![Windows]\nOS Support          | ![Windows], ![Linux], ![OSX], ![FreeBSD], ![OpenBSD], ![Solaris], ![Other]        | ![Windows]\nCPU Support         | `x86-64`, `x86-32`, [`ARM`](wiki/ARM-Builds), [`MIPS`](wiki/MIPS-Builds)          | `x86`\nSource Code Size    | **\u003c 500 lines (1 file)**                                                          | 778 lines (multiple files)\nLanguage            | **[Haskell] \\([GHC] / [LLVM]\\)**                                                  | F# / C#\nDependencies        | **none**                                                                          | .NET 4.0 + F# 2.0 Runtime\nDeployment          | **1 unified, native code binary for each platform**                               | 2 x .NET 4.0 managed binaries\nBinary Size         | 1-2 MB (~400 KB compressed)                                                       | **78.3 KB** (34.3 KB + 44 KB)\nConcurrency Model   | **1 Haskell thread per connection**                                               | 1 OS thread per connection\nDistribution Technique | **native sockets API and system calls of each OS**                             | Windows Communication Foundation\nDistributed Proxy Modes | **reverse, forward**                                                          | reverse\nLocal Proxy Modes   | **forward**                                                                       |\nNative IPv6 Support | **yes**                                                                           | **yes**\nInteractive Mode    | [**REPL in GHCi**](https://github.com/corsis/PortFusion/wiki/PortFusion-REPL)     |\nLicense             | ![GPLv3]                                                                          | ![GPLv3]\nAvailability        | **SourceForge.net (binary) \u003cbr /\u003e GitHub (source) \u003cbr /\u003e corsis.tech (commercial)** | SourceForge.net\n\n[ARM]:     wiki/ARM-Builds                                                                 \"ARM Builds\"\n[MIPS]:    wiki/MIPS-Builds                                                                \"MIPS Builds\"\n[GPLv3]:   http://gplv3.fsf.org/gplv3-127x51.png                                           \"GPLv3\"\n[Windows]: http://portfusion.sourceforge.net/w/wp-content/uploads/2012/05/os_win_other.png \"Windows\"\n[Linux]:   http://portfusion.sourceforge.net/w/wp-content/uploads/2012/05/os_oracle.png    \"Linux\"\n[OSX]:     http://portfusion.sourceforge.net/w/wp-content/uploads/2012/05/os_macosx.png    \"Mac OS\"\n[FreeBSD]: http://portfusion.sourceforge.net/w/wp-content/uploads/2012/05/os_freebsd.png   \"FreeBSD\"\n[OpenBSD]: http://portfusion.sourceforge.net/w/wp-content/uploads/2012/05/os_openbsd.png   \"OpenBSD\"\n[Solaris]: http://portfusion.sourceforge.net/w/wp-content/uploads/2012/05/os_solaris.png   \"Solaris\"\n[Other]:   http://portfusion.sourceforge.net/w/wp-content/uploads/2012/05/os_other.png     \"Other\"\n[Haskell]: http://www.haskell.org/                                                         \"Haskell\"\n[GHC]:     http://www.haskell.org/ghc/                                                     \"GHC\"\n[LLVM]:    http://llvm.org                                                                 \"LLVM\"\n[Haskell Platform]: http://hackage.haskell.org/platform/                                   \"Haskell Platform\"\n\n\n## Remember\n\n### Trademark\n\n```\nPortFusion™ is a trademark of Corsis Research (corsis.tech).\n```\n\n### Trademark Policy\n\n```\nYou may only distribute unchanged official binaries using the\nPortFusion and Corsis Marks.\n\nIf you're taking full advantage of the open-source nature of Corsis\nproducts and making significant functional changes, you may not\nredistribute the fruits of your labor under any Corsis trademark,\nwithout prior written consent from Corsis. For example, if you've\nmodified PortFusion, you may not use Corsis or PortFusion, in whole\nor in part, in your product name. Also, it would be inappropriate\nfor you to say \"based on Corsis PortFusion\". Instead, in the interest\nof complete accuracy, you could describe your executables as \"based on\nPortFusion technology\", or \"incorporating PortFusion source code.\"\nIn addition, a \"Powered by PortFusion\" logo will be made available.\n```\n\n### Copyright\n\n```\nCORSIS PortFusion ]-[ayabusa\n© 2011 - 2013     Cetin Sert\n```\n\n### License\n\n[![GPLv3]](http://beta.corsis.tech/license/)\n\n```\nThis program is free software: you can redistribute it and/or modify\nit under the terms of the GNU General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nThis program is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU General Public License for more details.\n```\n\n\n## Know\n\n### Principles\n\nDevelopment follows simple principles:\n\n1. Be concise: [PortFusion is a single-file with less than 500 lines of code](https://github.com/corsis/PortFusion/blob/master/src/Main.hs)\n2. Be relentless: [refactor and prune *constantly*](https://github.com/corsis/PortFusion/compare/v1.0...master#diff-9)\n4. Be open: share everything\n 1. Create [fully documented reusable libraries](http://hackage.haskell.org/package/splice) that [cover common needs](http://stackoverflow.com/questions/10080670/using-gnu-linux-system-call-splice-for-zero-copy-socket-to-socket-data-transfe)\n 2. [Use the most permissive licenses possible](http://hackage.haskell.org/package/splice)\n 3. Report [bugs in external code](http://hackage.haskell.org/trac/ghc/ticket/7134) and [work on fixes](https://github.com/haskell/network/issues/31)\n 4. [Illustrate every concept in publication-worthy detail](#illustrate)\n5. Be friendly: [provide excellent support to users](https://sourceforge.net/p/portfusion/discussion/general/thread/7ad0cb49/)\n\n### Japanese Influence: ]-[ayabusa (はやぶさ) (Hayabusa)\n\nI had already spent a great deal of time contemplating a nice and intuitive\nsyntax and it was only when I watched the Japanese movie\n[Hayabusa](http://www.dramacrazy.net/japanese-movie/hayabusa/) about [the\nsame-named space probe](http://en.wikipedia.org/wiki/Hayabusa) sent to extract\nand bring to Earth pieces from the asteroid Itokawa that everything just fell\ninto place:\n\n```\n# command line  # source file\n\n  ] [             :\u003e\u003c:          # serve\n  - [             :-\u003c:          # reverse\n  ] -             :\u003e-:          # forward\n\n# \u003e and \u003c are reserved characters at command line\n# ] and [ are reserved characters in Haskell\n```\n\nPortFusion owes its design goals, ambitions and 1.0 release name ]-[ayabusa\nto the great Japanese culture and friends.\n\n\n\n### Family\n\nWe hope to grow a whole family of software-defined networking solutions reaching\nall network layers, technologies and devices.\n\n\n## Thanks\n\nFor their continuing support and inspiration, we extend our heart-felt thanks to:\n\n\u003cdiv style='vertical-align: middle'\u003e\n\u003cimg alt='Internet Initiative Japan'                  title='Internet Initiative Japan'                                src='http://www.iij.ad.jp/en/common/images/hd_logo01.png' /\u003e\n\u003cimg alt='Commercial Users of Functional Programming' title='Commercial Users of Functional Programming' height='96px' src='http://portfusion.sourceforge.net/w/wp-content/uploads/2012/05/cufp.png' /\u003e\n\u003cimg alt='Japan Aerospace Exploration Agency'         title='Japan Aerospace Exploration Agency'                       src='https://upload.wikimedia.org/wikipedia/commons/8/85/Jaxa_logo.svg' /\u003e\n\u003c/div\u003e\n\n----\n\n## Contact\n\n[![corsis]](https://github.com/corsis/)\n\n[fusion@corsis.tech](mailto:fusion@corsis.tech)\n\n[corsis]: http://portfusion.sourceforge.net/i/l100.png \"Corsis Research\"\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcorsis%2Fportfusion","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcorsis%2Fportfusion","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcorsis%2Fportfusion/lists"}