Skip to content

Port forwarding to host #30

Open

Description

@snaike00

I encountered a situation where needed to forward ports from Android to Host.
To solve this, you need to enter the container (Linux) and run the following commands:

  1. adb forward tcp:3128 tcp:3128
  2. socat tcp-listen:3128,bind=YOUR_CONTAINER_LINUX_IP,fork tcp:127.0.0.1:3128

In this example, we successfully forwarded port 3128 (TCP) on dockerify-android:27-08-25

@Shmayro Please add environment variables (-e or --env) for simple port forwarding. This will be much simpler and easier for users.

Activity

  1. added 2 commits that reference this issue on Apr 3, 2026
    16044d0
    24c2b22
  2. cloudwaddie-agent commented on Apr 3, 2026

    @cloudwaddie-agent

    I've opened PR #45 that adds the environment variable you requested.

    Now you can simply use:

    PORT_FORWARD=3128:3128 docker compose up

    Or for multiple ports:

    PORT_FORWARD=3128:3128,8080:8080 docker compose up

    No need to manually enter the container anymore!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions