proxy icon indicating copy to clipboard operation
proxy copied to clipboard

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

Open yasershop opened this issue 2 years ago • 26 comments

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

yasershop avatar Jan 06 '23 06:01 yasershop

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

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

absoonoo avatar Jan 06 '23 06:01 absoonoo

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

yasershop avatar Jan 06 '23 08:01 yasershop

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

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

absoonoo avatar Jan 06 '23 08:01 absoonoo

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 avatar Jan 06 '23 10:01 yasershop

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

با احترام

ehsanghaffar avatar Jan 06 '23 11:01 ehsanghaffar

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

Amo3epi avatar Jan 06 '23 12:01 Amo3epi

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 avatar Jan 06 '23 13:01 ehsanghaffar

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

slawlor avatar Jan 06 '23 14:01 slawlor

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

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

absoonoo avatar Jan 07 '23 06:01 absoonoo

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?

FarzadRoghani avatar Jan 07 '23 14:01 FarzadRoghani

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

gharibe avatar Jan 07 '23 16:01 gharibe

@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.

FarzadRoghani avatar Jan 07 '23 16:01 FarzadRoghani

@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.

gharibe avatar Jan 07 '23 16:01 gharibe

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

mohsen202 avatar Jan 07 '23 17:01 mohsen202

@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.

gharibe avatar Jan 07 '23 18:01 gharibe

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.

maryyam avatar Jan 07 '23 23:01 maryyam

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 avatar Jan 07 '23 23:01 gharibe

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.

gharibe avatar Jan 07 '23 23:01 gharibe

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

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

Ptechgithub avatar Jan 08 '23 09:01 Ptechgithub

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

FarzadRoghani avatar Jan 08 '23 15:01 FarzadRoghani

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: @.***>

Ptechgithub avatar Jan 08 '23 16:01 Ptechgithub

زمانی که میخوام 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

jahangard avatar Jan 09 '23 16:01 jahangard

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

AliceG206 avatar Jan 11 '23 09:01 AliceG206

Good

Naseer1995 avatar Jan 11 '23 09:01 Naseer1995

Good

Naseer1995 avatar Jan 11 '23 09:01 Naseer1995

I suggest you close this issue

ehsanghaffar avatar Mar 10 '24 06:03 ehsanghaffar