Git Product home page Git Product logo

warp-svc's Introduction

warp-svc

Cloudflare WARP client as a socks5 server in docker

This dockerfile will create a docker image with official Cloudflare WARP client for linux and provides a socks5 proxy to use in other compaliant applications either in your local machine or by other docker containers in a docker compose or Kubernetes.

The official Cloudflare WARP client for Linux only listens on localhost for the socks proxy so you cannot use it in a docker container which need to bind on 0.0.0.0

Features

  • Register a new Cloudflare WARP account
  • Configurable "families mode"
  • Subscribe to Cloudflare WARP+

How to use

The socks proxy in exposed on port 1080

You can use these environment variables:

  • FAMILIES_MODE: Use one of off, malware and full values. (Default: off)
  • WARP_LICENSE: Put your WARP+ licesne. (You can get a free WARP+ license from this telegram bot: https://t.me/generatewarpplusbot)

You should mount /var/lib/cloudflare-warp directory of the container to your host to make you WARP account persistant. Notice that each WARP+ license is working only on 4 device so persisting the configuration is important!

Using as a local proxy with Docker

docker run -d --name=warp -e FAMILIES_MODE=full -e WARP_LICENSE=xxxxxxxx-xxxxxxxx-xxxxxxxx -p 127.0.0.1:1080:1080 -v ${PWD}/warp:/var/lib/cloudflare-warp ghcr.io/aleskxyz/warp-svc:latest

You can verify warp by visiting this url:

curl -x socks5h://127.0.0.1:1080 -sL https://cloudflare.com/cdn-cgi/trace | grep warp

warp=on

You can also use warp-cli command to control your connection:

docker exec warp warp-cli --accept-tos status

Status update: Connected
Success

Using as a proxy for other containers with docker-compose

version: "3"
services:
  warp:
    image: ghcr.io/aleskxyz/warp-svc:latest
    expose:
    - 1080
    restart: always
    environment:
      WARP_LICENSE: xxxxxxxx-xxxxxxxx-xxxxxxxx
      FAMILIES_MODE: off
    volumes:
    - ./warp:/var/lib/cloudflare-warp
  app:
    image: <app-image>
    depends_on:
    - warp
    environment:
      proxy: warp:1080

warp-svc's People

Contributors

aleskxyz avatar underw8 avatar

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  avatar  avatar

Watchers

 avatar  avatar  avatar

warp-svc's Issues

socat listen port

Hello
Can you change the socat port from 1080 to any other that is not used as standard proxy ports?

Handle UDP connections

Hi,

First, thanks for making this docker image. It has been very stable.

However, it looks like so far only TCP connections are handled

socat tcp-listen:1080,reuseaddr,fork tcp:localhost:40000 &

I am not familiar with socat, but with some quick googling, I found that it is possible to let socat to handle both TCP and UDP connection on one port (ref), maybe just add one line like socat udp-listen:1080,reuseaddr,fork udp:localhost:40000 & ?

the log file created as a link in volumes

I did use :

volumes:
    - ./warp:/var/lib/cloudflare-warp

in docker-compose, and I thought I could check the log but inside of warp folder there is a cfwarp_service_log.txt, it's a link, not a file......

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.