[{"data":1,"prerenderedAt":273},["ShallowReactive",2],{"project-40553267":3},{"id":4,"name":5,"line":6,"line_source":7,"title":8,"url":9,"domain":10,"maker":11,"posted_at":12,"year":13,"points":14,"comments":15,"rank_in_year":16,"shown_in_year":17,"top":18,"tier":19,"category":20,"subcategory":21,"format":22,"keywords":23,"reception":28,"sentiment":29,"stance_mix":30,"scored_comments":33,"aspects":34,"strip":38,"post_text":41,"what":42,"said":52,"maker_in_thread":122,"shape":134,"grid":139,"attempts":231,"same_week":236,"maker_shows":165,"maker_hidden":266,"reader_version":267,"card":268},"40553267","File Tunnel","Tunnelling TCP through a file","title","Show HN: Tunnelling TCP through a file","https:\u002F\u002Fgithub.com\u002Ffiddyschmitt\u002FFile-Tunnel","github.com","fiddyschmitt",1717328344,2024,180,37,443,3515,13,"notable","infrastructure","network tunneling","cli",[24,25,26,27],"tcp tunnel","tunnel through file","rdp tunnel","file share tunnel","curious",0,{"positive":31,"neutral":32,"mixed":29,"critical":31},1,12,14,{"idea":35,"performance":36,"execution":37},{"positive":31,"critical":31},{"positive":29,"critical":29},{"positive":29,"critical":29},[29,29,29,29,29,29,29,29,39,29,29,29,29,40,29,29,40,40,29,40,29,40,40,29,29,29,40,40,31,29,40,40,40,29,29,40,29],5,3,"This program can be used to tunnel TCP connections through a file.\n\nPeople have used it for interesting things:\n\n- Bridging connections which would otherwise be blocked by a firewall\n\n- Tunneling through RDP (similar to an SSH tunnel)\n\n- Exposing a localhost web server to others\n\nKey features I put effort into:\n\n1. The shared file is restarted every 10 MB, so it doesn't grow indefinitely.\n\n2. Optimisations for latency & bandwidth. (800 Mbps on a Gigabit LAN. 108 Mbps if file tunneling through RDP)\n\n3. Synchronisation between two sides (each side can be started and restarted in any order)\n\nI'd ",{"problem":43,"audience":49,"pricing":49,"motivation":49,"time_to_build":49,"stack":50,"openness":51,"stage":51,"team_size":51},{"value":44,"source":45,"evidence":46},"Bridging TCP connections that a firewall blocks, by routing them through a shared file","maker",[47],{"id":48},"post",null,[],"unknown",{"praise":53,"objections":66,"requests":82,"questions":94,"alternatives":106},[54],{"value":55,"source":56,"evidence":57},"Commenters find the approach clever and interesting","commenter",[58,62],{"id":59,"by":60,"text":61},"40574114","aeonik","This is utterly mind blowing.",{"id":63,"by":64,"text":65},"40564677","rakoo","There's a more complete version of this with nncp: https:\u002F\u002Fwww.complete.org\u002Fnncp\u002F",[67],{"value":68,"source":56,"evidence":69},"Commenters question how it differs from netcat with mkfifo",[70,74,78],{"id":71,"by":72,"text":73},"40565947","bawolff","What's the benefit of this over netcat + mkfifo?",{"id":75,"by":76,"text":77},"40568395","zamadatix","``` mkfifo \u002Fmnt\u002Fshared\u002Fconnection nc localhost 12345 > \u002Fmnt\u002Fshared\u002Fconnection \u003C \u002Fmnt\u002Fshared\u002Fconnection ``` Seems the same?",{"id":79,"by":80,"text":81},"40566458","lambdaxyzw","netcat+mkfifo does the actual transfer with TCP - so there's no tunneling involved. This solution tunnels tcp through file abstraction, so it works significantly differently. As…",[83],{"value":84,"source":56,"evidence":85},"Suggest using native named pipes or virtual channels instead of a file",[86,90],{"id":87,"by":88,"text":89},"40564891","jclarkcom","I think you can use named pipes if you are using SMB. Here is a example code in python (not tested). import socket import win32pipe import win32file import sys BUFFER_SIZE = 4096…",{"id":91,"by":92,"text":93},"40568710","resoluteteeth","For RDP you can use virtual channels so you don't need to use a file over drive redirection",[95],{"value":96,"source":56,"evidence":97},"How do the two sides coordinate reads and writes on the shared file",[98,102],{"id":99,"by":100,"text":101},"40564964","andrewstuart","So there’s multiple writers to the file? How is this arbitrated? Also how does either side know when the file has been updated?",{"id":103,"by":104,"text":105},"40565430","jandrese","It looks like one file per direction, and this is a point to point connection. It looks like each side just reads to the end of the file and then tries to read more to see if any…",[107,112,116],{"value":108,"source":56,"evidence":109},"netcat with mkfifo",[110,111],{"id":71,"by":72,"text":73},{"id":75,"by":76,"text":77},{"value":113,"source":56,"evidence":114},"nncp",[115],{"id":63,"by":64,"text":65},{"value":117,"source":45,"evidence":118},"rdp2tcp",[119],{"id":120,"by":11,"text":121},"40569825","Cool. I think rdp2tcp uses virtual channels for tunneling: https:\u002F\u002Frdp2tcp.sourceforge.net\u002F",{"comments":123,"answered":40,"key":124},9,[125,128,131],{"id":126,"text":127},"40569776","Woah!",{"id":129,"text":130},"40569516","Nice! It's so good when you can cobble together various tools to achieve something like that.",{"id":132,"text":133},"40570124","Haha!",{"commenters":135,"max_depth":136,"maker_replies":123,"first_comment_mins":137,"lifespan_hours":138},25,4,1609,53,[140,144,147,149,153,156,159,160,162,163,167,168,170,172,176,179,182,186,189,190,193,196,198,199,203,205,208,210,211,213,216,219,222,223,226,228,230],[141,29,29,142,143,29],"40562948","commenter\u002Fneutral\u002Fnone","ycombiredd",[145,29,29,142,146,29],"40565043","mr_mitm",[148,29,29,142,143,29],"40565662",[150,29,29,151,152,29],"40567106","other\u002Fneutral\u002Fnone","nullindividual",[154,29,29,151,155,29],"40567965","adolph",[157,29,29,151,158,29],"40571404","_flux",[63,31,29,151,64,29],[126,31,29,161,11,31],"project\u002Fpositive\u002Fidea",[59,31,39,161,60,29],[164,165,29,151,166,29],"40568445",2,"rnmmrnm",[129,165,29,142,11,31],[169,165,29,151,60,29],"40573915",[171,165,29,151,166,29],"40575672",[173,40,40,174,175,29],"40568478","project\u002Fneutral\u002Fidea","dheera",[177,40,29,151,178,29],"40568510","ranger_danger",[180,40,29,151,181,29],"40569470","simpsond",[183,40,40,184,185,29],"40571353","project\u002Fneutral\u002Fperformance","mike_d",[187,136,40,174,188,29],"40570049","DonHopkins",[132,136,29,161,11,31],[191,136,40,184,192,29],"40571975","imhoguy",[194,136,29,151,195,29],"40576209","HocusLocus",[197,39,40,184,88,29],"40564723",[87,39,40,174,88,29],[200,39,29,201,202,29],"40568357","commenter\u002Fcritical\u002Fnone","naikrovek",[204,39,29,161,11,31],"40569842",[206,39,29,207,11,31],"40569600","maker\u002Fneutral\u002Fperformance",[71,209,40,174,72,29],6,[79,209,40,174,80,29],[75,209,31,212,76,29],"project\u002Fcritical\u002Fidea",[214,209,29,215,11,31],"40569630","maker\u002Fneutral\u002Fidea",[217,209,40,174,218,29],"40572538","Thorrez",[99,220,40,221,100,29],7,"project\u002Fneutral\u002Fexecution",[103,220,40,221,104,29],[224,220,29,225,11,31],"40569740","maker\u002Fneutral\u002Fexecution",[227,220,29,225,11,31],"40569720",[91,229,40,174,92,29],8,[120,229,29,215,11,31],[232,233],{"id":4,"t":12,"points":14,"comments":15},{"id":234,"t":235,"points":40,"comments":31},"40561527",1717413435,[237,242,247,252,257,261],{"id":238,"name":239,"points":240,"category":241},"40562458","Photon",843,"hardware",{"id":243,"name":244,"points":245,"category":246},"40522844","Delve",766,"ai",{"id":248,"name":249,"points":250,"category":251},"40528045","Shade Map",685,"productivity",{"id":253,"name":254,"points":255,"category":256},"40562210","qStudio",355,"dev_tools",{"id":258,"name":259,"points":260,"category":241},"40585932","Foosbar",323,{"id":262,"name":263,"points":264,"category":265},"40582357","pn0gstr0m",309,"games",false,"v2",{"id":269,"name":5,"line":6,"ai":266,"cat":20,"year":13,"points":14,"comments":15,"rec":28,"s":29,"top":18,"kw":270,"maker":11,"domain":10,"tier":19,"attempts":165,"strip":271,"url":9,"mix":272,"praise":55,"objection":68,"sub":21},40553267,[24,25,26,27],"0000000050000300330303300033103330030",[31,32,29,31],1794036655692]