https://github.com/fiddyschmitt/File-Tunnel Skip to content Navigation Menu Toggle navigation Sign in * Product + Actions Automate any workflow + Packages Host and manage packages + Security Find and fix vulnerabilities + Codespaces Instant dev environments + GitHub Copilot Write better code with AI + Code review Manage code changes + Issues Plan and track work + Discussions Collaborate outside of code Explore + All features + Documentation + GitHub Skills + Blog * Solutions For + Enterprise + Teams + Startups + Education By Solution + CI/CD & Automation + DevOps + DevSecOps Resources + Learning Pathways + White papers, Ebooks, Webinars + Customer Stories + Partners * Open Source + GitHub Sponsors Fund open source developers + The ReadME Project GitHub community articles Repositories + Topics + Trending + Collections * Enterprise + Enterprise platform AI-powered developer platform Available add-ons + Advanced Security Enterprise-grade security features + GitHub Copilot Enterprise-grade AI features + Premium Support Enterprise-grade 24/7 support * Pricing Search or jump to... Search code, repositories, users, issues, pull requests... Search [ ] Clear Search syntax tips Provide feedback We read every piece of feedback, and take your input very seriously. [ ] [ ] Include my email address so I can be contacted Cancel Submit feedback Saved searches Use saved searches to filter your results more quickly Name [ ] Query [ ] To see all available qualifiers, see our documentation. Cancel Create saved search Sign in Sign up You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert {{ message }} fiddyschmitt / File-Tunnel Public * Notifications You must be signed in to change notification settings * Fork 7 * Star 124 * Tunnel TCP connections through a file License MIT license 124 stars 7 forks Branches Tags Activity Star Notifications You must be signed in to change notification settings * Code * Issues 3 * Pull requests 0 * Actions * Projects 0 * Security * Insights Additional navigation options * Code * Issues * Pull requests * Actions * Projects * Security * Insights fiddyschmitt/File-Tunnel This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository. master BranchesTags Go to file Code Folders and files Name Name Last commit message Last commit date Latest commit History 122 Commits ft ft ft_tests ft_tests img img .gitattributes .gitattributes .gitignore .gitignore LICENSE.md LICENSE.md README.md README.md ft.sln ft.sln View all files Repository files navigation * README * MIT license File Tunnel Tunnel TCP connections through a file. Download Portable executables for Windows and Linux can be found over in the releases section. Example 1 - Bypassing a firewall ft_fw You'd like to connect from Host A to Host B, but a firewall is in the way. But both hosts have access to a shared folder. Host A ft.exe --tcp-listen 127.0.0.1:5000 --write "\\server\share\1.dat" --read "\\server\share\2.dat" Host B ft.exe --read "\\server\share\1.dat" --tcp-connect 127.0.0.1:3389 --write "\\server\share\2.dat" Now on Host A, configure the client to connect to: 127.0.0.1:5000 Example 2 - Tunnel TCP through RDP (similar to SSH tunnel) You'd like to connect to a remote service (eg. 192.168.1.50:8888), but only have access to Host B using RDP. Host A ft.exe --tcp-listen 127.0.0.1:5000 --write "C:\Temp\1.dat" --read "C: \Temp\2.dat" Run an RDP client and ensure local drives are shared as shown here. Connect to Host B. Host B ft.exe --read "\\tsclient\c\Temp\1.dat" --tcp-connect 192.168.1.50:8888 --write "\\tsclient\c\Temp\2.dat" Now on Host A, you can connect to 127.0.0.1:5000 and it will be forwarded to 192.168.1.50:8888 How does it work? The program starts a TCP listener, and when a connection is received it writes the TCP data into a file. This same file is read by the counterpart program, which establishes a TCP connection and onforwards the TCP data. To avoid the shared file growing indefinitely, it is purged whenever it gets larger than 10 MB. About Tunnel TCP connections through a file Topics tunnel firewall rdp port-forwarding Resources Readme License MIT license Activity Stars 124 stars Watchers 3 watching Forks 7 forks Report repository Releases 8 File Tunnel v2.0.0 Latest May 27, 2024 + 7 releases Languages * C# 100.0% Footer (c) 2024 GitHub, Inc. Footer navigation * Terms * Privacy * Security * Status * Docs * Contact * Manage cookies * Do not share my personal information You can't perform that action at this time.