termux / termux/termux-api

Add API for binding specific process or session to network

Open
#771 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
4.3k
Forks
920
PR merge metrics
No merged PRs in 30d

Description

Feature description

I need to bind specific processes or Termux sessions to the tun interface while using other processes/sessions with the normal network. I can't just bind the process to the specific network interface due to Android system limitations (I have unrooted phone and currently can't root it). For example, curl <some_url> --interface tun1 doesn't work.

I need this feature to set up a SOCKS proxy server that redirects requests to tun network while other Termux sessions and apps making connections through normal network.

Reference implementation

Have you checked if the feature is accessible through the Android API?

Yes, bindProcessToNetwork.

Do you know of other open-source apps that has a similar feature as the one you want? (Provide links)

No. Please tell me if you know any app that can bind to tun and set up a SOCKS proxy.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names no repository files or tests. Start by reviewing Android's ConnectivityManager.bindProcessToNetwork reference and determine how process or session scope maps to Termux's existing API surface; done would require a defined API for selecting a tun network per process or session while leaving other sessions on normal networking.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, java
Domain
mobile-dev, networking
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.