Giter Site home page Giter Site logo

kzahel / connection-forwarder Goto Github PK

View Code? Open in Web Editor NEW
80.0 8.0 15.0 685 KB

Chromebook app for forwarding connections from/to different ports and interfaces (or to internal android IP)

Home Page: https://chrome.google.com/webstore/detail/connection-forwarder/ahaijnonphgkgnkbklchdhclailflinn

JavaScript 99.80% HTML 0.05% CSS 0.10% Shell 0.05%

connection-forwarder's Introduction

Connection Forwarder

(TCP Socket forwarder app)

Available in webstore: https://chrome.google.com/webstore/detail/connection-forwarder/ahaijnonphgkgnkbklchdhclailflinn

I made this app so that I could ssh into termux running on a chromebook without developer mode. Maybe you find it useful for something else.

  • Update 3: Updated the build system

  • Update 2: It's useful again as ports are not automatically forwarded for crostini (linux) containers

  • Update 1: Android container apps automatically forward listening ports to the LAN since Chrome 63.

  • Use case 1: make termux sshd available on the LAN, not just on the local chromebook.

  • Use case 2: make crostini container service available on LAN or localhost

  • Use case 3: make an android-based development server (such as apache or php etc) available on the local network

  • Use case 4: (??) Let me know [email protected] or create an issue

Background info: android runs on a chromebook on a NAT interface that is not exposed directly on the LAN. Certain services are forwarded (such as mDNS). Everything else, not. This app lets you setup simple forwarding rules to have certain ports get forwarded to the internal android interface.

Build / development setup notes

The nice react auto reload tools don't work very well in the chrome app context (which disallow eval, inline scripts, external resources (loaded via URL). Basically all app code must be statically present in the app directory at launch time.

  • git clone (this repository)
  • cd connection-forwarder/react-ui; npm install; npm run watch ( or npm run build)
  • Go to chrome://extensions, check the developer mode box, click load unpacked extension, select the "app" folder in this repository.

Packaging

  • cd connection-forwarder/app
  • ../scripts/package.sh (you may need to apt install zip)

Release History

  • 2017-11-4 - created react based UI
  • 2017-10-26 - Initial version used to get access to the SSH server running on tmux

TODO

  • UDP packet forwarding
  • cleanup/close sockets ✔️
  • create a UI to create/remove rules ✔️
  • add options such as autostart, backgrounding, etc ✔️
  • localhost listening API to list/add/remove forwards.

LICENSE

MIT

connection-forwarder's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

connection-forwarder's Issues

fetch with credentials included does not send cookies

I'm using fetch with credentials: 'include' and have cookies set for my localhost:8080 domain but do not see them being applied to the request headers. Running my node server in a crostini VM works otherwise. On an i5 Pixelbook with Chrome dev channel v68.

UDP?

Hi. I'm in a hotel room, and decided it might be /fun/ to try and put OpenWRT on this tp-link travel router. Because why not?

But I need a tftp server. Which I now have in Crostini. Now to try and expose it to the rest of the universe (or at least the usb ethernet dongle plugged into the chromebook)

But tftp is UDP, and connection-forwarder seems to be TCP locked? (as it, it says TCP and the control is disabled) /sadface

Still, an awesome tool which at some point I'm sure I will be very grateful for. Thanks for creating it.

Can't Delete / Turn off Rules

I'm experiencing a consistent issue while using your utility.

When I add a new rule, I can't delete or turn it off afterwards.

When I click the toggle under the name (below), it doesn't do anything. Even if I click and hold it (which has worked for me in the past) it doesn't turn off. It's the same thing with the delete button, I have to wipe the app's data. Am I doing something wrong?
image

Browser: Chrome 97.0.4692.71
OS: Windows NT: 10.0.19042
Extension: ahaijnonphgkgnkbklchdhclailflinn : Connection Forwarder : version 0_0_9

Enabled extension-related flags:
Native Client chrome://flags/#enable-nacl
Extensions on chrome:// URLs chrome://flags/#extensions-on-chrome-urls

Edit 1:
I updated to the most recent version of Chrome (97.0.4692.99 (Official Build) (64-bit)) and now I can't even open the app anymore.

The app won't start

The application works fine first time, when installed. But everytime I turn of my Chromebook, it's impossible to start the app. The rules that I sat before, doesn't work, even if I choose the setting "run I background". The only way to fix the problem (that I've found) is to uninstall the application and install it again. Then I can set up a rule, but the issue is the same as soon as I turn of the computer.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.