Configuration

WebSocket Configuration

Configuration for the plug-in is handled by the config.yml found under <your minecraft directory>/plugins/WebSocketServices folder. Any configuration changes you make will not take effect until you reload your configurations for the server. This can be done by either restarting the server or by simply typing the reload command for your server. The following configuration values are addressed below. If you have any questions for any of the values below that are not addressed here, please contact me.

PortNumber

This simply specifies the port number that the WebSocketServices server will run on. Make sure that nothing else is running on this port on your server.

  • Parent Config: websocket
  • Config Name: portNumber
  • Config Value: Suggested ports (25564 to 65535)
  • Default Value: 25564
Logging

Logging is used to provide you with details about the internal operations of this plug-in and how it responds to client-side requests. This configuration value has three options.

  • Parent Config: websocket
  • Config Name: logging
  • Config Value:
    • 0 - Off, no logging is performed.
    • 1 - Simple, just enough information is shown to help you diagnosis any problems with the plug-in.
    • 2 - Verbose, extremely detailed information down to the output of the actual client-side request. Only use this option if you are having extreme difficulty in getting the plug-in to work properly, and to help you debug plug-in and client-side development.
  • Default Value: 0
Maximum Connections

This value determines the maximum number of concurrent connections to the WebSocketServer that can be obtained. While all WebSocketServices are stateless requests, connections will be opened and closed immediately once the information is obtained. This, however, may not be the case for additional plug-ins developed as an extension to the WebSocketServer and may hold open connections. Please be aware of the operation of extensions to this plug-in and set this value accordingly.

  • Parent Config: websocket
  • Config Name: maximumConnections
  • Config Value: 0 - 2147483647
  • Default Value: 32
Handshake Tolerance

This value determines the maximum amount of time that the server will wait for a handshake to complete. The lower this value the more likelihood that a handshake will fail with connections with high latency. Adjust this value up only as needed if handshaking begins to fail repeatily. Please note that this value is in milliseconds.

  • Parent Config: websocket
  • Config Name: handshakeTimeOutTolerance
  • Config Value: 0 - 2147483647
  • Default Value: 1000 (1 second)
Frame Tolerance

This value determines the maximum amount of time that the server will wait for a frame to complete. The lower this value the more likelihood that a frame transmission will fail with connections with high latency. Adjust this value up only as needed if handshaking begins to fail repeatily. If you are developing an extension to this plug-in, please note that the more data you transmit per frame will require a larger frame tolerance. Please note that this value is in milliseconds.

  • Parent Config: websocket
  • Config Name: frameTimeOutTolerance
  • Config Value: 0 - 2147483647
  • Default Value: 3000 (3 second)
Check Origin

This value determines if the server checks the origin of the client-side request. This value should always be true. It is an additional security constraint of the WebSocket Protocol that the server must check the origin. Do not set this value to false unless you are developing an extension for this plug-in on a local server. Please be aware that custom clients can spoof the origin.

  • Parent Config: websocket
  • Config Name: checkOrigin
  • Config Value: true or false.
  • Default Value: true
White-listing Origins

This value determines if your server is restricting client-side requests from a specific origin. To create an origin restricted white-list, create a file called White-list.txt under the folder <your minecraft directory>/plugins/WebSocketServices. Please note that the filename will case-sensitive on linux boxes, so name the file White-list.txt exactly. Inside the white-list, add only the domains that you will allow to respond to a client-side request. Please be aware that custom clients can still spoof an origin and can still get a response from the WebSocketServer.

  • Parent Config: websocket
  • Config Name: whitelist
  • Config Value: true or false.
  • Default Value: false

White-list.txt example

www.caffeinatedrat.com
caffeinatedrat.com
Pingable

This value is reserved for future use. Currently, browsers do not support a pingable method that can be called by javascript, so this feature does not work. In the future if and when browsers support this javascript method then this value will determine if your server can be pinged via this method. It would be best to keep this value set to false. If you have a custom client, which does have the capability to use the ping method, then enable this feature by setting it to true.

  • Parent Config: websocket
  • Config Name: pingable
  • Config Value: true or false.
  • Default Value: false

Service Configuration

The WebSocketServices plug-in works with services on a granular level in that you have to give permission to each service before it can work. This includes extensions to this plug-in. All extensions must have their service listed and set to true or that service will not be processed. Enabling and disabling services is as simple as setting each one to true or false. This also means you can disable native services that you do not wish to expose. If a service is not listed in the config.yml then it will be treated as if the service has been disabled.

Who Services

Provides a client with a list of visible players online. Hidden players will not be shown by this service.

  • Parent Config: services
  • Config Name: who
  • Config Value: true or false.
  • Default Value: true
Plugins Services

Provides a client with a list of plug-ins.

  • Parent Config: services
  • Config Name: plugins
  • Config Value: true or false.
  • Default Value: true
Info Services

Provides a client with a basic list of server information.

  • Parent Config: services
  • Config Name: info
  • Config Value: true or false.
  • Default Value: true
Whitelist Services

Provides a client with a list of white-listed players.

  • Parent Config: services
  • Config Name: whitelist
  • Config Value: true or false.
  • Default Value: true
Offlineplayers Services

Provides a client with a list of offline players. These are players that have logged into the server at least once.

  • Parent Config: services
  • Config Name: offlineplayers
  • Config Value: true or false.
  • Default Value: true
Ping Services

Provides a client with a response telling the client the server is alive. The server's time is also returned. Please note that this is a replacement for the pingable option.

  • Parent Config: services
  • Config Name: ping
  • Config Value: true or false.
  • Default Value: true
Fragmentation Test Services

This is for testing only. It allows the server to test fragmented frames. Keep this feature turned off unless you are debugging an extension.

  • Parent Config: services
  • Config Name: fragmentationtest
  • Config Value: true or false.
  • Default Value: false
Binary Fragmentation Test Services

This is for testing only. It allows the server to test fragmented frames. Keep this feature turned off unless you are debugging an extension.

  • Parent Config: services
  • Config Name: binaryfragmentationtest
  • Config Value: true or false.
  • Default Value: false
Extension Services

Extensions are plug-ins that are written to use the WebSocketServices plug-in, thus adding their own functionality. If you have a WebSocketServices extension running on your server then you must grant it permission to operate. Below is an example of the Spectator extension. The spectator extension uses the service name spectator, so this is what the configuration name would be.

  • Parent Config: services
  • Config Name: spectator
  • Config Value: true or false.
#Configuration for the commands (services) that are supported.
services:
  who: true
  plugins: true
  info: true
  whitelist: true
  offlineplayers: true
  ping: true
  spectator: true

Comments

Posts Quoted:
Reply
Clear All Quotes