WhatsApp / proxy

This repository contains the WhatsApp proxy implementation for users to host their own proxy infrastructure to connect to WhatsApp for chat (VoIP is not currently supported)
MIT License
1.32k stars 351 forks source link

ساخت سرور پروکسی برای واتس آپ #28

Open yasershop opened 1 year ago

yasershop commented 1 year ago

دوستان عزیز ایرانی میشه به زبان فارسی توضیح بدن اینجا طریقه درست کردن پروکسی رو روی سرور مجازی

absoonoo commented 1 year ago

دوستان عزیز ایرانی میشه به زبان فارسی توضیح بدن اینجا طریقه درست کردن پروکسی رو روی سرور مجازی

ساختن پراکسی فقط اجرای چند دستور ساده است اما نکهداری و رفع ایراد و صدها مشکل دیگر نیاز به تخصص دارد، وقتی شما حتی دو کلمه انگلیسی را سعی بر فهمیدن نمیکنی قطعا در اجرای فرامین دچار مشکل خواهی شد.

yasershop commented 1 year ago

شما زحمت بکش همون چنتا دستور رو بزار بقیش با خودمون

absoonoo commented 1 year ago

شما زحمت بکش همون چنتا دستور رو بزار بقیش با خودمون

یک بک بزن دستورات اینجاست :https://github.com/WhatsApp/proxy

yasershop commented 1 year ago

docker build /path_to_cloned_repository/proxy/ -t whatsapp_proxy:1.0 تو این دستور خطا میده unable to prepare context: path "/path_to_cloned_repository/proxy/" not found

ehsanghaffar commented 1 year ago

docker build /path_to_cloned_repository/proxy/ -t whatsapp_proxy:1.0 تو این دستور خطا میده unable to prepare context: path "/path_to_cloned_repository/proxy/" not found

آقای @yasershop عزیز، کاربر @absoonoo درست میگن دیگه. این خطایی که گرفتین مال اینه که شما حتی path نمیدونین چیه. حداقل یه دانش basic از داکر و لینوکس و صددرصد انگلیسی لازم دارین برای ران کردن یه همچین چیزی. راه حلش اینه:

Please clone this repo to your server and add its address to the docker command. example:

cd /home
git clone https://github.com/WhatsApp/proxy/

docker build /home/proxy/proxy/ -t whatsapp_proxy:1.0

با احترام

Amo3epi commented 1 year ago

docker run -it -p 180.149.44.153:80 whatsapp_proxy:1.0 docker: Invalid hostPort: 180.149.44.153. See 'docker run --help'.

ehsanghaffar commented 1 year ago

docker run -it -p 180.149.44.153:80 whatsapp_proxy:1.0 docker: Invalid hostPort: 180.149.44.153. See 'docker run --help'.

آقا کجا زده که آی پی رو بدین؟ 😳

slawlor commented 1 year ago

docker run -it -p 180.149.44.153:80 whatsapp_proxy:1.0 docker: Invalid hostPort: 180.149.44.153. See 'docker run --help'.

So this command is invalid, docker's -p flag denotes the HOST_PORT:CONTAINER_PORT mapping, which isn't anything about IP addresses. What we're saying in our sample command is

-p 80:80

Take "host port" 80 (standard HTTP) and send it to the container's port 80. You are free to re-map these ports as you see fit on your host machine, such as

-p 8080:80

So host port 8080 -> container port 80. However if you do that, your client will need to utilize "8080" as that is what will be exposed publicly

absoonoo commented 1 year ago

زمانی که میخوام docker build بزنم چنین اروری میگیرم تا الان با docker کار نکردم و فقط یه شناخت سطحی ازش دارم،‌ ممنون میشم یه کمک بکنین :)‌ The command '/bin/sh -c apk --update --no-cache add curl openssl jq bash' returned a non-zero code: 4

میتونی از جایی که سرور گرفتی به جای نصب سیستم عامل لینوکس تعیین کنی که داکر نصب شده دریافت کنی

FarzadRoghani commented 1 year ago

I have successfully run the commands, the thing is I don't know what to share , where is the ip address i need to share?

gharibe commented 1 year ago

commands below worked on a AWS Amazon linux instance and I was able to connect on port 5222 ssh to your host

switch to root user

sudo su
yum update -y
yum install git -y
git clone https://github.com/WhatsApp/proxy.git
yum install docker
docker version

Download the pkg

sudo curl -L https://github.com/docker/compose/releases/latest/download/docker-compose-$(uname -s)-$(uname -m) -o /usr/bin/docker-compose

Enable execution of the script

sudo chmod +x /usr/bin/docker-compose
docker-compose version
service docker start

build the container image and run, If everything went successfully, stop it by CTRL+C.

docker-compose -f /home/ec2-user/proxy/proxy/ops/docker-compose.yml up

run the container as a service -d flag

docker-compose -f /home/ec2-user/proxy/proxy/ops/docker-compose.yml up -d

It must show:

[+] Running 1/1 Container whatsapp_proxy Started

FarzadRoghani commented 1 year ago

@gharibe, got an error ; port is already allocated. another question, How can my family in Iran connect through the proxy I made, Unfortunately my IT knowledge is very limited. and I am super new to Linux.

gharibe commented 1 year ago

@FarzadRoghani you most likely have something else running on that server using one of the ports. maybe from your pervious tries. I started fresh. if you are doing this in AWS you will need to assign a public ip address(elastic ip) to the instance. then use that to connect for example 45.55.65.75:5222. I don't know how to test this from Iran.

mohsen202 commented 1 year ago

آیا سرور رایگان برای این کار می‌شناسید؟ سپاس

gharibe commented 1 year ago

@FarzadRoghani Technically you don't need to assign the elastic ip as long the option to auto assign a public address is checked. when you are creating the instance. however that ip address might change . you can run curl http://checkip.amazonaws.com on your instance to get the public address.

maryyam commented 1 year ago

commands below worked on a AWS Amazon linux instance and I was able to connect on port 5222 ssh to your host

switch to root user

sudo su
yum update -y
yum install git -y
git clone https://github.com/WhatsApp/proxy.git
yum install docker
docker version

Download the pkg

sudo curl -L https://github.com/docker/compose/releases/latest/download/docker-compose-$(uname -s)-$(uname -m) -o /usr/bin/docker-compose

Enable execution of the script

sudo chmod +x /usr/bin/docker-compose
docker-compose version
service docker start

build the container image and run, If everything went successfully, stop it by CTRL+C.

docker-compose -f /home/ec2-user/proxy/proxy/ops/docker-compose.yml up

run the container as a service -d flag

docker-compose -f /home/ec2-user/proxy/proxy/ops/docker-compose.yml up -d

It must show:

[+] Running 1/1 Container whatsapp_proxy Started

I did it all but still am not able to connect to the proxy. I am using my own laptop.

gharibe commented 1 year ago

Those are the step to install the proxy. you'll need to open ports on your home router. to allow traffic to inbound traffic. that process is different depending on the model of your router. you should be able to find step by step how to open port/ port forwarding on google.

gharibe commented 1 year ago

This is a good article for anyone who wants to do this in AWS or on the cloud https://tamimi-naser.medium.com/how-to-set-up-a-whatsapp-proxy-server-6c2269cccbd8. my only suggestion to allow ssh on port 22 only from your external ip not everywhere.

Ptechgithub commented 1 year ago

دوستان عزیز ایرانی میشه به زبان فارسی توضیح بدن اینجا طریقه درست کردن پروکسی رو روی سرور مجازی

How to create WhatsApp proxy👇👇 https://youtu.be/7GXIOV40NcQ

FarzadRoghani commented 1 year ago

I have manged to create servers both locally and on AWS, however, you can not make a video call in WhatsApp. which makes it less appealing than other alternatives

Ptechgithub commented 1 year ago

Not active at the moment

On Sun, Jan 8, 2023, 6:56 PM Farzad @.***> wrote:

I have manged to create servers both locally and on AWS, however, you can not make a video call in WhatsApp. which makes it less appealing than other alternatives

— Reply to this email directly, view it on GitHub https://github.com/WhatsApp/proxy/issues/28#issuecomment-1374861953, or unsubscribe https://github.com/notifications/unsubscribe-auth/A4F5UDH6VFT7WEY3USRUEDDWRLMDNANCNFSM6AAAAAATSXW6KU . You are receiving this because you commented.Message ID: @.***>

jahangard commented 1 year ago

زمانی که میخوام docker build بزنم چنین اروری میگیرم تا الان با docker کار نکردم و فقط یه شناخت سطحی ازش دارم،‌ ممنون میشم یه کمک بکنین :)‌ The command '/bin/sh -c apk --update --no-cache add curl openssl jq bash' returned a non-zero code: 4

شما داکر رو نصب کردی؟ اگه نصب نکردی اینطوری نصب کن. برای لینوکس اوبونتو

sudo su
apt-get remove docker docker-engine docker.io containerd runc
apt-get update
apt-get install ca-certificates curl gnupg lsb-release git
mkdir -p /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
apt-get update
chmod a+r /etc/apt/keyrings/docker.gpg
apt-get update
apt-get install docker-ce docker-ce-cli containerd.io docker-compose-plugin
AliceG206 commented 1 year ago

I wanted to run Whatsapp proxy on windows 10 but I face this error which I attached in the message. Do you know any way that I can solve this problem? PS. the installation of docker has been successful and it works

executor failed running [/bin/sh -c apk --no-cache add curl openssl jq bash]: exit code: 4

Naseer1995 commented 1 year ago

Good

Naseer1995 commented 1 year ago

Good

ehsanghaffar commented 4 months ago

I suggest you close this issue