5151 - Supporting to configure the bot clusters, and start at once.
5252 - Supporting colourful console logging strings expression ` colorizeText("&6Hello &lWorld") ` .
5353 - Automatic answer questions in ` 2b2t.xin ` for speeding up login process.
54- - Supporting to reload a plugin while the client is running on server .
54+ - Supporting to configure proxy settings for multiple bots .
5555
5656## Screenshots:
5757### Running on Windows server 2019:
6363 ** Features category:**
6464 - [ ` Hot-Reloading Plugin ` ] ( #hot-swapping-plugins-in-game )
6565- [ ` Terminal Interactions ` ] ( )
66+ - [ ` Proxy Settings ` ] ( )
6667
6768** Implemented Event APIs:**
6869- [ ` Programmable State Machine ` ] ( PluginDocs.md#3-programmable-login-state-machine )
8687In this section, you will understand below how-tos:
8788 - ** 1. How to directly start a single bot with command-line.**
8889 - ** 2. How to specify bot profile with config file without command-line.**
89- - ** 3. How to start multiple bot simultaneously**
90+ - ** 3. How to start multiple bot simultaneously with proxy settings **
9091 - ** 4. How to configure advanced options**
9192 - ** 5. How to make a custom plugin**
9293
93941 . ** Download the Client**
9495 Download the jar archive file: ` DolphinBot-[version]-full.jar ` .
9596 Requirements: ** Java version >= 17**
96972 . ** Configuration of the Bot**
97- ** Configuring Profile**
98+ ### Configuring Profile
9899 There are two different ways to set bot config:
99- - If you want to quickly start for simplicity and only one bot started , you can use ** Command-line setting**
100+ - If you want to quickly start for simplicity, you can use ** Command-line setting**
100101 - If you would like to start multiple bot at once, and access advanced options, you can use ** Config file setting**
101102
102103 1 . ** Command-line Setting**
103104 In-game profile should be defined on below boot command-line.
104105 An example of argument list:
105106 ``` bash
106- java -jar " DolphinBot-[version]-full.jar" -username=[username] -password=[password] -skin-recorder=[enable/disable]
107+ java -jar " DolphinBot-[version]-full.jar" -- username=[username] -- password=[password] - -skin-recorder=[enable/disable]
107108 ```
108- ` --username` : in-game displaying name of bot.
109- ` --password` : password for login or register.
110- ` --auto-reconnect` : whether reconnect to server when got kicked or disconnect by some reasons.
111- ` --skin-recorder` : whether automatic capture and save online players' skins.
112- `--server` : target server address.
113- `--port` : target server port.
109+ | Command Lines | Description |
110+ | --------------------| ----------------------------------------------------------------------------|
111+ | ` --username` | in-game displaying name of bot. |
112+ | ` --password` | password for login or register. |
113+ | ` --auto-reconnect` | whether reconnect to server when got kicked or disconnect by some reasons. |
114+ | ` --skin-recorder` | whether automatic capture and save online players' skins. |
115+ | `--server` | target server address. |
116+ | `--port` | target server port. |
117+
114118 Example:
115119 ```bash
116120 java -jar "DolphinBot-[version]-full.jar" --username=[username] --password=[password] --server=0.0.0.0 --port=25565
117121 ```
118- or
119122 ```bash
120123 java -jar "DolphinBot-[version]-full.jar" --username=Dolphin1 --password=123 --server=2b2t.xin --port=25565 --owner=Melibertan
121124 ```
122- Command profile will be loaded:
123125 <p align="center">
124126 <img src="assets/dolphinbot-profile.png" alt="profile list">
125127 </p>
126128
129+ >[!Note]
127130 **Warning:** command-line has high authority than config file, meaning that if options are duplicated, will only recognize
128131 command-line, and ignore config file one.
132+
133+ >[!TIP]
129134 Optionally, you can specify more option by adding argument:
130- `--owner` : Specifying only who can use this bot.
131- 2. **Config File Setting**
135+ `--owner` : Specifying only who can use this bot.
136+
137+ **Example:**
138+ `--owner=Melibertan`, of course, you also can define multiple names. For each owner name, should be split with ";".
139+ **Example:**
140+ `--owner=owner1;owner2;owner3;...`
141+ ### Config File Setting
132142 Config files include functional config `mc.bot.config.json` and profile config `bot.profiles.json`
133143 You can also move above profile arguments into config file ``bot.profiles.json`` following below formats, all config values in it will be loaded.
134144 DolphinBot will apply command-line options first, duplicated options in config file will be ignored.
135145 To specify the path of config file is optional, Use option `--config-file` to locate config directory or file.
136146 For example:
137147 ```bash
138- java -jar "DolphinBot-[version].jar" -config-file=path/to/config.json
148+ java -jar "DolphinBot-[version].jar" -- config-file=path/to/config.json
139149 ```
140150 If the path you specified is a directory instead of a file, Dolphin will extract config file as default config in this directory.
141151 ```bash
142- java -jar "DolphinBot-[version].jar" -config-file=path/to/config_directory
152+ java -jar "DolphinBot-[version].jar" -- config-file=path/to/config_directory
143153 ```
144154 If the `--config-file` parameter is absented, DolphinBot will create a default file on jar directory.
145155 ```bash
146156 java -jar "DolphinBot-[version].jar"
147157 ```
148-
149- In the profile config file, you can create `profiles` key in `bot.profiles.json` to specify multiple bot profiles to log to a server.
158+ **multiple bot & proxy settings**
159+ In the profile config file, you can create `profiles` field in `bot.profiles.json` to specify multiple bot profiles to log to a server.
160+ >[!NOTE]
161+ Some servers may prohibit multiple bots started on same IP, proxy settings is aimed to help you to run multiple bots
162+ from different network environments or requiring distinct egress IPs.
163+
164+ To configure proxy settings for each bot, you need to edit `proxy` field. An example shown below:
165+ >[!Warn]
150166 **Warning**: Defining multiple bots may trigger the anti-bot or anti-cheat, and some servers with strict policy may prohibit it.
151167 ```json
152168 {
@@ -155,46 +171,67 @@ In this section, you will understand below how-tos:
155171 "name": "Player494",
156172 "password": "123example",
157173 "owner": ["player_name"],
158-
159174 "enabled_plugins": [
160175 "QuestionAnswerer",
161176 "MessageDisplay",
162177 "HumanVerify"
163- ]
178+ ],
179+ "proxy": {
180+ "enabled": false,
181+ "info": {
182+ "address": "XX.XXX.XXX.XX",
183+ "port": 8081,
184+ "type": "SOCKS4",
185+ "username": "",
186+ "password": ""
187+ }
188+ }
164189 },
165190 "bot#2": {
166191 "name": "Player495",
167192 "password": "password",
168193 "owner": ["player_name", "other_owner"],
169-
170194 "enabled_plugins": [
171195 "HumanVerify"
172- ]
196+ ],
197+ "proxy": {
198+ "enabled": false,
199+ "info": {"...": "..."}
200+ }
173201 },
174202 "bot#3": {"...": "..."}
175203 }
176204 }
177205 ```
178- where `enabled_plugins` key represents which plugins should enable on the bot.
206+
207+ 1. `enabled_plugins` field represents which plugins should enable on the bot.
208+ 2. `proxy` fields (optional) represents a proxy configurations for each bot, field `enabled` marks whether activate this proxy setting,
209+ and field `info` contains:
210+
211+ | field | Description |
212+ |-------------|-------------------------------------------------|
213+ | `address` | Remote IP address or host name of proxy server. |
214+ | `port` | Proxy server port. |
215+ | `type` | Proxy mode. (`HTTP`, `SOCKS4`, `SOCKS5`) |
216+ >[!TIP]
217+ "username", "password" is optional, if the remote proxy server require to auth, you need to add these.
218+
179219 In this case, if you want to load `bot#1` as your single bot, you should add below argument:
180220 ```bash
181- java -jar "DolphinBot-[version].jar" --config-file=path/to/config_directory -profiles="bot#1"
182- ```
183- or
221+ java -jar "DolphinBot-[version].jar" --config-file=path/to/config_directory --profiles="bot#1"
222+ ```
184223 ```bash
185224 java -jar "DolphinBot-[version].jar" --profiles="bot#1"
186225 ```
187- If you want to start multiple bot simultaneously, specify multiple profile name as a list in option `-profiles`, for
226+ If you want to start multiple bot simultaneously, specify multiple profile name as a list in option `-- profiles`, for
188227 each profile name, should be split with ";".
189228
190- **Examples:**
191- ```bash
192- java -jar "DolphinBot-[version].jar" --profiles="bot#1;bot#2"
193- ```
229+ **Examples:**
194230 ```bash
195231 java -jar "DolphinBot-[version].jar" --profiles="bot#1;bot#2;bot#3;..."
196232 ```
197- - **Warning**: If the `--profiles` option is absented, it will load all bots in profile config by default.
233+ >[!NOTE]
234+ > - **Warning**: If the `--profiles` option is absented, it will load all bots in profile config by default.
198235
199236 **Owners:**
200237 If you want to limit a bot can be only use by specified player(s) you can put player names into `owner` as list.
@@ -210,23 +247,21 @@ In this section, you will understand below how-tos:
210247 "owner2",
211248 "owner3"
212249 ],
213-
214- "enabled_plugins": [
215- "QuestionAnswerer",
216- "MessageDisplay",
217- "HumanVerify"
218- ]
250+ "enabled_plugins": [ "QuestionAnswerer", "MessageDisplay", "HumanVerify" ],
251+ "proxy": {
252+ "enabled": false,
253+ "info": {
254+ "address": "XX.XXX.XXX.XX",
255+ "port": 8081,
256+ "type": "SOCKS4",
257+ "username": "",
258+ "password": ""
259+ }
260+ }
219261 }
220262 }
221263 }
222264 ```
223-
224- Or you can directly define it by command line.
225- **Example:**
226- `--owner=Melibertan`, of course, you also can define multiple names:
227- For each owner name, should be split with ";".
228- **Example:**
229- `--owner=owner1;owner2;owner3;...`
230265 2. **Advanced Configurations (optional)**
231266 If you want to access more advanced configs, you can edit `mc.bot.config.json`.
232267 Every single config option is equilibrium to option that defined by command line, and all config value including
@@ -262,6 +297,7 @@ In this section, you will understand below how-tos:
262297 | `reconnect-delay` | Min delay(millis) for cooling down when reconnect a server. |
263298 | `msg-send-delay` | The delay of sending in-game messages. |
264299 | `enable-packet-debug` | Whether enable packet debugger. |
300+
265301## Hot Swapping Plugins In-Game
266302Dolphin bot supports you to **hot-reload** and **hot-load** (**hot injection**) plugins in server, without quit the entire client and reconnecting to server.
267303You can send `!reload <pluginName>` dolphin command in server chat.
@@ -285,7 +321,7 @@ Alternatively, you can type `reload plugin.jar` in the terminal to hot-reload pl
285321 Sure! you can become the **second contributor** of DolphinBot team! you can join at any time freely.
286322
287323### Our First Contributor:
288- 1. huangdihd - (Fixed a critical bug in commit [README.md](README.md) (`#372990a`)
324+ 1. huangdihd - (Fixed a critical bug in commit(`#372990a`)
289325## Community
290326 - Encountered a bug? issues and suggestions are welcome!
291327 My Bilibili space:
0 commit comments