Instaling Cow proxy on docker (ubuntu 20.4)

What is Cow Proxy ?

COW (Climb Over the Wall) proxy on Docker

Cow Proxy is a web proxy backed by tunnel technology. Like VPN, it hides your IP address and encrypt your traffic, but a lot easier to use.

 

 

Requirement

Configuration

Make a Dockerfile and Add these Variables

				
					FROM alpine
RUN apk update && apk add curl && apk add bash
#installing Cow Proxy
RUN curl -s -L git.io/cow | bash 

EXPOSE 7777/tcp

ENTRYPOINT ["/cow"]
				
			

3- Make a docker-compose.yml and Paste following Parameter :

				
					version: "3"
services:
  cowproxy:
    build: .
    image: cow-proxy:1
    ports:
      - "8585:7777"
    volumes:
      - "./config-file:/root/.cow/rc"
    restart: always

				
			

3- Make a Config File that includes your Proxy User nad password

				
					listen = http://0.0.0.0:7777

logFile = /dev/stderr

userPasswd = user:pass

				
			

Client Side Config

Proxy setting for  your Linux

For setting up proxy settinf for yor Current User You need just to Set these Enviornment (You can do it in Terminal to but that way is not Permanent)

vim ~/.bash_profile

				
					export http_proxy=user:pass@proxyhost.com:7777
export https_proxy=user:pass@proxyhost.com:7777
exprot no_proxy=localhost, 127.0.0.1, *.my.lan
				
			
You can Test your Proxy Functionality by Doing Curl with –proxy you need to receive 200 Response  code
				
					for ((i=1;i<=10;i++)); do curl -I https://cloud.google.com/ --proxy  http://user:password@YOUR_PROXY_IP:8585 -vv; done
				
			
You can Clone whole Project from my Github Repository

how to install docker on ubuntu

Introduction

In this Article we are going to  install docker-ce on Ubuntu 20 but before installation we should know about :

What is Docker ?

how to intall docker packops.dev installing docker on ununtu how to docker compose on ubuntu

Docker is a set of platform as a service products that use OS-level virtualization to deliver software in packages called containers. Containers are isolated from one another and bundle their own software, libraries and configuration files; they can communicate with each other through well-defined

what is docker-compose ?

Compose is a tool for defining and running multi-container Docker applications. With Compose, you use a YAML file to configure your application’s services. … Run docker compose up and the Docker compose command starts and runs your entire app.

 

Configuration

1- Setup Repository

				
					 sudo apt-get update

 sudo apt-get install \
    apt-transport-https \
    ca-certificates \
    curl \
    gnupg \
    lsb-release
				
			

2- Add Docker’s official GPG key:

				
					 curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
				
			

3- Add Docker’s official Repository :

				
					echo \
  "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu \
  $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
				
			

4- Installing  Docker

				
					 sudo apt-get update

 sudo apt-get install docker-ce docker-ce-cli containerd.io
				
			

Installing Docker from Bash script

				
					wget -qO-  https://raw.githubusercontent.com/farshadnick/docker-installation-script/main/docker-install.sh | sh
				
			

Installing Docker-compose  from Bash script

				
					wget -qO-  https://raw.githubusercontent.com/farshadnick/docker-installation-script/main/docker-compose-install.sh | sh