Skip to content

ShyamalThakur/ship-proxy-system

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ship Proxy System

A cost-efficient proxy system designed for cruise ships that minimizes satellite internet costs by reusing a single TCP connection for all outbound HTTP/S requests.

System Architecture

Browser/curl → Ship Proxy (8080) → Single TCP → Offshore Proxy (9999) → Internet
  • Ship Proxy (Client): Runs on the ship, accepts HTTP proxy connections, queues requests, and forwards them sequentially over a single TCP connection
  • Offshore Proxy (Server): Runs remotely, receives requests over TCP, forwards them to target servers, and sends responses back

Features

  • Single persistent TCP connection between ship and offshore proxy
  • Sequential request processing to ensure reliability
  • Support for all HTTP methods (GET, POST, PUT, DELETE, etc.)
  • HTTPS support via CONNECT method tunneling
  • Automatic reconnection on connection failures
  • Docker support with multi-architecture builds
  • Works with curl, browsers, and other HTTP clients

Quick Start

Using Docker Compose (Recommended)

  1. Clone this repository
  2. Run the entire system:
docker-compose up -d
  1. Test with curl:
# HTTP request
curl -x http://localhost:8080 http://httpforever.com/

# HTTPS request
curl -x http://localhost:8080 https://httpbin.org/get

# POST request
curl -x http://localhost:8080 -X POST -d "test data" http://httpbin.org/post

Using Docker Images

Run the offshore proxy:

docker run -p 9999:9999 your-username/offshore-proxy

Run the ship proxy:

docker run -p 8080:8080 -e OFFSHORE_HOST=localhost your-username/ship-proxy

Manual Installation

Prerequisites

  • Python 3.8+
  • No additional dependencies (uses only standard library)

Running the Offshore Proxy

cd server
python server.py

Running the Ship Proxy

cd client
python client.py --offshore-host=localhost --offshore-port=9999

Testing

Basic HTTP Test

curl -x http://localhost:8080 http://httpforever.com/

HTTPS Test

curl -x http://localhost:8080 https://httpbin.org/get

Multiple HTTP Methods

# GET
curl -x http://localhost:8080 http://httpbin.org/get

# POST
curl -x http://localhost:8080 -X POST -d '{"key":"value"}' -H "Content-Type: application/json" http://httpbin.org/post

# PUT
curl -x

About

Cost-efficient proxy system for cruise ships - minimizes satellite internet costs using single TCP connection

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors