{"id":15755727,"url":"https://github.com/woozymasta/bercon","last_synced_at":"2025-03-13T16:32:11.618Z","repository":{"id":227527156,"uuid":"771673919","full_name":"WoozyMasta/bercon","owner":"WoozyMasta","description":"bercon is the command line interface for the BattlEye RCON protocol for Linux and Windows","archived":false,"fork":false,"pushed_at":"2024-03-14T12:17:38.000Z","size":441,"stargazers_count":7,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-10-05T08:41:01.842Z","etag":null,"topics":["arma","arma3","battleye","battleye-rcon","cli","dayz","rcon","rcon-client","rcon-console"],"latest_commit_sha":null,"homepage":"https://woozymasta.github.io/bercon","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/WoozyMasta.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2024-03-13T18:28:49.000Z","updated_at":"2024-09-22T22:42:30.000Z","dependencies_parsed_at":"2024-03-13T19:49:35.240Z","dependency_job_id":null,"html_url":"https://github.com/WoozyMasta/bercon","commit_stats":null,"previous_names":["woozymasta/bercon"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WoozyMasta%2Fbercon","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WoozyMasta%2Fbercon/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WoozyMasta%2Fbercon/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WoozyMasta%2Fbercon/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/WoozyMasta","download_url":"https://codeload.github.com/WoozyMasta/bercon/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221388620,"owners_count":16810835,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["arma","arma3","battleye","battleye-rcon","cli","dayz","rcon","rcon-client","rcon-console"],"created_at":"2024-10-04T08:40:26.899Z","updated_at":"2025-03-13T16:32:11.612Z","avatar_url":"https://github.com/WoozyMasta.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# bercon\r\n\r\n\u003e [!WARNING]  \r\n\u003e This project is abandoned, use [bercon-cli](https://github.com/WoozyMasta/bercon-cli) instead - it has good implementation and support\r\n\r\n![logo][]\r\n\r\n`./bercon` is the command line interface for the **BattlEye RCON** protocol\r\n\r\n\u003c!-- rule: current lang, other langs sorted by alpha --\u003e\r\n\u003e [!NOTE]  \r\n\u003e This document is available in the languages:\r\n\u003e [eng 🇬🇧][], [cz 🇨🇿][], [rus 🇷🇺][], [ua 🇺🇦][]\r\n\r\n## Description\r\n\r\n`bercon` provides a convenient way to interact with the server using the\r\nBattlEye RCON (Remote Console) protocol.\r\nThis tool allows you to execute various commands,\r\ncontrol the server, and track responses from the server.\r\n\r\nIt is suitable for such servers as Arma2, Arma3, DayZ, etc. using the\r\nprotocol [BERConProtocol][], with a full list of games you can\r\ncheck out the full list of games on the [BattlEye][] website\r\n\r\n## Installation\r\n\r\nYou can download the latest version of the programme by following the links\r\n[Linux] or [Windows]\r\n\r\nFor Linux you can also use the command\r\n\r\n```bash\r\ncurl -#SfLo /usr/bin/bercon \\\r\n  https://github.com/WoozyMasta/bercon/releases/latest/download/bercon\r\nchmod +x /usr/bin/bercon\r\nbercon -h \u0026\u0026 bercon -V\r\n```\r\n\r\nOr do the build yourself\r\n\r\n```bash\r\ngit clone https://github.com/WoozyMasta/bercon\r\ncd bercon\r\ncargo build\r\n```\r\n\r\n## Parameters\r\n\r\n```txt\r\nBattlEye RCON CLI\r\n\r\nUsage: bercon [OPTIONS] --password \u003cPASSWORD\u003e \u003cCOMMAND\u003e\r\n\r\nCommands:\r\n  cli     Open interactive CLI\r\n  exec    Execute a command (e.g. commands or players)\r\n  listen  Listen for server responses\r\n  help    Print this message or the help of the given subcommand(s)\r\n\r\nOptions:\r\n  -i, --ip \u003cIP\u003e                Server IPv4 address [env: BERCON_IP=] [default: 127.0.0.1]\r\n  -p, --port \u003cPORT\u003e            Server UDP port [env: BERCON_PORT=] [default: 2305]\r\n  -P, --password \u003cPASSWORD\u003e    Password [env: BERCON_PASSWORD]\r\n  -t, --timeout \u003cTIMEOUT\u003e      Timeout in seconds [env: BERCON_TIMEOUT=] [default: 45]\r\n  -k, --keepalive \u003cKEEPALIVE\u003e  Keepalive in seconds [env: BERCON_KEEPALIVE=] [default: 30]\r\n  -d, --debug                  Print debug messages and data\r\n  -h, --help                   Print help\r\n  -V, --version                Print version\r\n```\r\n\r\n\u003e [!NOTE]  \r\n\u003e If the timeout is set to less than the connection control,\r\n\u003e then the connection control value will also change to the set value.  \r\n\u003e Connection control cannot be set for more than 45 seconds,\r\n\u003e because it makes no sense, and all larger values will be set to 45 seconds.\r\n\r\n## Usage Examples\r\n\r\nYou can use arguments, variables, or a combination of both\r\n\r\n```bash\r\nbercon -p 2306 -P myPass exec players\r\nBERCON_PASSWORD=myPass BERCON_PORT=2306 bercon exec players\r\nBERCON_PASSWORD=myPass bercon -p 2306 exec players\r\n```\r\n\r\nThe argument value has the highest priority over the environment variable\r\n\r\n```bash\r\n# pas$$word will be used\r\nBERCON_PASSWORD='strong' bercon -P 'pas$$word' exec players\r\n```\r\n\r\nDon't forget to use inverted commas, as passwords and commands may contain\r\ncommand line control characters.\r\nWhen you use arguments with `-`,\r\nsuch as `say -1`, you should specify `--` to tell the program,\r\nthat the argument analysis is complete\r\n\r\n```bash\r\nbercon --ip 192.168.0.10 --port 2306 --password 'pas$$word' exec -- '#lock'\r\nbercon -i 192.168.0.10 -p 2306 -P 'pas$$word' exec -- '#unlock'\r\nbercon -t1 -i 192.168.0.10 -p 2306 -P 'pas$$word' exec -- say -1 'Hello world!'\r\n```\r\n\r\n## Additional linux examples\r\n\r\nYou can also use variables to store parameters for\r\ndifferent servers in different files\r\n\r\n```bash\r\n# in the ~/.server-1.env file\r\nBERCON_IP=192.168.0.10\r\nBERCON_PORT=2306\r\nBERCON_PASSWORD='pas$$word'.\r\n\r\n# read the file and execute the command\r\n. .server-1.env \u0026\u0026 bercon exec players\r\n```\r\n\r\nAn example function that will allow you to execute commands on several of your\r\nDayZ servers at the same time\r\n\r\n\u003e [!TIP]  \r\n\u003e Functions can be placed in `~/.bashrc` for quick access to them\r\n\r\n```bash\r\nexport DAYZ_SERVERS_COUNT=5\r\n\r\ndayz-all-rcon() {\r\n  for i in $(seq 1 \"$DAYZ_SERVERS_COUNT\"); do\r\n    printf '[%s] ' \"Server-$i\"\r\n    . \"~/.server-$i.env\".\r\n    bercon -t1 exec -- \"$1\";\r\n    echo\r\n  done\r\n}\r\n\r\n# show players on all servers\r\ndayz-all-rcon players\r\n# ban GUIDs permanently on all servers\r\ndayz-all-rcon addBan \"$GUID\" 0 cheater\r\n```\r\n\r\nThis example will allow you to conveniently perform a delayed restart on all\r\nDayZ servers at the same time, notifying players that a restart is imminent\r\n\r\n\u003e [!TIP]  \r\n\u003e This example recycles the function from the previous example\r\n\r\n```bash\r\ndayz-all-restart() {\r\n  local timer=\"${1:-120}\" step=\"${2:-10}\"\r\n  dayz-all-rcon '#lock'\r\n  dayz-all-rcon say -1 \"Server locked for new connection, restart after $timer seconds\"\r\n  for i in $(seq \"$timer\" \"-$step\" 0); do\r\n    sleep \"$step\"\r\n    dayz-all-rcon say -1 \"Restart server after $timer seconds\"\r\n  done\r\n  dayz-all-rcon '#shutdown'\r\n}\r\n\r\n# restart all servers after 120 (default) seconds\r\ndayz-all-restart\r\n# restart all servers after 360 seconds\r\ndayz-all-restart 360\r\n```\r\n\r\n\u003e [!CAUTION]  \r\n\u003e At the time of writing, the modified version of the DayZ server for Linux\r\n\u003e has a problem with server stopping ([T179734]), you may need to additionally\r\n\u003e monitor the state of the process. As one solution for example\r\n\u003e script [DayZ Linux Server watchdog]\r\n\r\nWith this example, you can stop and shut down all DayZ servers\r\nbefore maintaining your server\r\n\r\n\u003e [!TIP]  \r\n\u003e This example utilises the function from the previous example\r\n\r\n```bash\r\ndayz-all-shutdown() {\r\n  dayz-all-restart \"${1:-120}\" \"${2:-10}\"\r\n  for i in $(seq 1 \"$DAYZ_SERVERS_COUNT\"); do\r\n    systemctl --user stop \"dayz-server@$i.service\" \u0026\r\n    systemctl --user disable \"dayz-server@$i.service\"\r\n  done\r\n  wait\r\n}\r\n\r\n# shutdown all servers after 360 seconds\r\ndayz-all-shutdown 360\r\n```\r\n\r\n\u003c!-- Links --\u003e\r\n[eng 🇬🇧]: README.md\r\n[ua 🇺🇦]: docs/README.ua.md\r\n[rus 🇷🇺]: docs/README.ru.md\r\n[cz 🇨🇿]: docs/README.cz.md\r\n[logo]: assets/logo.png\r\n\r\n[Linux]: \u003chttps://github.com/WoozyMasta/bercon/releases/latest/download/bercon\u003e \"Linux x86 gcc binary\"\r\n[Windows]: \u003chttps://github.com/WoozyMasta/bercon/releases/latest/download/bercon.exe\u003e \"Windows exe file\"\r\n[BattlEye]: \u003chttps://www.battleye.com/\u003e \"BattlEye – The Anti-Cheat Gold Standard\"\r\n[BERConProtocol]: \u003chttps://www.battleye.com/downloads/BERConProtocol.txt\u003e \"BattlEye RCON Protocol Specification\"\r\n[T179734]: https://feedback.bistudio.com/T179734 \"linux modded server shutdown bug\"\r\n[DayZ Linux Server watchdog]: https://gist.github.com/WoozyMasta/3c3aaf8d1b1517e9ee47c6b2a96fee96 \"DayZ Linux Server watchdog\"\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwoozymasta%2Fbercon","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwoozymasta%2Fbercon","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwoozymasta%2Fbercon/lists"}