This repository contains code for the getgrass-bot
, a bot designed to perform WebSocket connections through various HTTP proxies.
The getgrass-bot
bot establishes WebSocket connections using HTTP proxies to a specified WebSocket server. It utilizes the ws
library for WebSocket communication and the https-proxy-agent
library for proxy support.
- Clone this repository to your local machine.
- Navigate to the project directory.
- Install dependencies using npm:
npm install
-
Open the
config.js
file in a text editor. -
Obtain your user ID from the Getgrass website:
- Visit https://app.getgrass.io/dashboard.
- Open the browser's developer tools (usually by pressing F12 or right-clicking and selecting "Inspect").
- Go to the "Console" tab.
- Paste the following command and press Enter:
localStorage.getItem('userId');
- Copy the value returned, which is your user ID.
-
Modify the
userId
variable inconfig.js
with your user ID. -
Update the
httpProxyList
array with the desired HTTP proxy URLs. Ensure each URL is in the formathttp://username:password@hostname:port
. -
Save the changes to
config.js
. -
Run the
getgrass-bot
by executing the following command:
node index.js
In the config.js
file:
- Modify the
userId
variable with your user ID. - Update the
httpProxyList
array with the desired HTTP proxy URLs. Ensure each URL is in the formathttp://username:password@hostname:port
.