ssh tunnel between two android devices - android

I want to create a ssh tunnel between two android devices for directing internet traffic from one device to another. I installed connectbot and proxydroid in one smartphone. I ask: is there a ssh server app for android that is right for me?
The second question: i have a ssh server with public ip. Can i create a ssh tunnel from each device to this server for redirecting traffic from one device to another? If yes, how can i make this using these apps (connectbot and proxydroid)?
Thanks to everybody

I like this SSH Server App.
I do not know which "traffic" you want to redirect, so I can not help you there.

Related

How to connect an android app running on a device connected via ADB to hit REST API on local server?

I have a multi-tenant web app like
http://xxxxx.constant-domain.com:8080/
in my host file
127.0.0.1 xxxxx.constant-domain.com
The device that has the android app running is connected via ADB which calls my webapp's Rest Apis to get and send data and
It runs fine on dev and prod environments like
http://xxxxx.dev.constant-domain.com/get-data
but the problem is I want to debug it on my local server. I tried adding the given domain as base url but it doesn't work.
I tried adding http://localhost:8080/ as well but it doesn't work.
I tried looking for questions here but didn't find anything that would help.
I'm using retrofit for Api calls.
Any help would be appreciated.
First of all, make sure that your local server and your device are using a same wifi. And then find out the option to put your local server online. There is an option in Wamp Server to put it online. I don't know which software you are using to setup apache or any kind of server on your computer.
And then you will be able to access your local server by ip address. Also there is an option to edit virtual hosts of your server to allocate a specific port that the app can connect.
It doesn't matter whether you use Retrofit or Volley or Okhttp or any other things. You need to setup your local server to be online within your local network.
I figured it out. All I needed to do was to set my private Ip as
http://192.168.8.400:8080/get-data
Hope this helps anyone who is in this situation.

How to intercept mobile traffic on Android?

I have a device (videocamera) with Android inside.
I have root access via ADB to the OS of the videocamera.
The camera sends data to the internet using a SIM card.
Is there a way to redirect the mobile traffic to a proxy, so that I could research it?
1) Seems that an apk like ProxyDroid may help, but it lacks the command line interface.
2) I tried redirecting the traffic using Access Point Name (APN), but is did not help.
The common tool for this is Charles Proxy, but you'd need to be able to install certificates on the host device.

How to access NodeJS from another network

I have a NodeJS server that I'm currently working on in my machine. The OS is Windows 10.
I'm part of a small team of two and we are currently in a stage of development where i'm branching out to android app development and the other guy is making additional changes to the NodeJS server.
Thing is, when we gather and use the same network, I can successfully connect to the server being hosted in another computer via the app by using target computer's IP_address:port when making the HTTP request, but when we are "home-office-ing" we can't seem to be able to see or connect to the server being hosted in each other's machines.
Even by using the http://192.168.0.x:port ,address which works when we are connected in the same network, we can't access and get ERR_CONNECTION_TIMED_OUT when in different networks.
The port we are using to open the server is port 80, but we tried with port 3000 and forwarded it on the router, and still, it doesn't work
Is there a way to open up the server so it can be seen by a computer in an outside network?(I know that it will also be available for any other computer to see and interact with the server)
You have to use public IP address.
The most easiest solution is to rent a VPS with public IP address.
Just Google 'rent vps server' to find any hosting provider.

Debugging an App, that needs a URL to a server

I have a Xamarin Solution with an Android, iOS, and Windows mobile solution. I also have a Web Server that sits on localhost:XXXX.
I need to be able to access the URI endpoints on my local, while debugging on Mobile.
While the Web Server is running I go to fiddler, and compose http://localhost:XXXX/api/Locationsand everything is correct, I get the JSON data and life is good.
However when debugging the App on any phone, I suspect the endpoint on the phone is trying to access it's own "localhost". Is there a hosts file that I can edit on the emulators? or another solution?
If you have WiFi, change localhost to your local IP address and connect phone to that WiFi

How to test my own ASP.NET Web API in localhost:port using android or Windows Phone device (no simulator)

I'm trying to develop my first REST Service using ASP.NET following this guide.
I'd like to test my services in localhost using my android and wp devices without using android and WP simulator (too slow).
Is there a way to do that?
If you deploy the ASP.NET app on IIS, the services will be reachable as long as the phones are connected on the same network (via Wifi for example). Just use the IP adress of the server instead of localhost.
Another idea is to use fiddler's proxy option. (This also assumes you have set up your app in IIS). Check out this article.
This approach is especially useful if you want to test using custom host headers over SSL.
With this approach you can simulate production dns (by altering hosts file on the fiddler host) rather than using IP addresses and machine names from the mobile device.

Categories

Resources