{"id":26319400,"url":"https://github.com/jxpro/custom-rustdesk","last_synced_at":"2025-03-15T15:18:56.485Z","repository":{"id":233554392,"uuid":"787431821","full_name":"Jxpro/custom-rustdesk","owner":"Jxpro","description":"A tool to provide a custom ID generation function for RustDesk","archived":false,"fork":false,"pushed_at":"2024-12-19T11:40:20.000Z","size":22,"stargazers_count":3,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-12-19T12:34:12.737Z","etag":null,"topics":["crypto","rust","rustdesk"],"latest_commit_sha":null,"homepage":"https://github.com/Jxpro/custom-rustdesk","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Jxpro.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"publiccode":null,"codemeta":null}},"created_at":"2024-04-16T14:07:25.000Z","updated_at":"2024-12-19T11:40:24.000Z","dependencies_parsed_at":"2024-05-28T13:27:22.255Z","dependency_job_id":null,"html_url":"https://github.com/Jxpro/custom-rustdesk","commit_stats":null,"previous_names":["jxpro/custom-rustdesk"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jxpro%2Fcustom-rustdesk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jxpro%2Fcustom-rustdesk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jxpro%2Fcustom-rustdesk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jxpro%2Fcustom-rustdesk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Jxpro","download_url":"https://codeload.github.com/Jxpro/custom-rustdesk/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243746232,"owners_count":20341204,"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":["crypto","rust","rustdesk"],"created_at":"2025-03-15T15:18:56.012Z","updated_at":"2025-03-15T15:18:56.477Z","avatar_url":"https://github.com/Jxpro.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# RustDesk Custom ID Tool\r\n\r\n## Introduction\r\n\r\n\u003e   Note that if a certain ID is invalid and reset, it may be that the ID is too short or occupied, please try a different ID.\r\n\r\n中文文档: [README_CN.md](https://github.com/Jxpro/custom-rustdesk/blob/main/README_CN.md)\r\n\r\nThis project aims to provide a custom ID generation function for `RustDesk`, making it easier for users to remember and manage devices. The primary function is to simulate the official encryption algorithm, encrypting user-entered custom IDs and outputting the encrypted ID. By replacing the `enc_id` field in the configuration file with this output, users can complete the setup.\r\n\r\nFor MacOS, the configuration file is located at:\r\n\r\n-   `~/Library/Preferences/com.carriez.RustDesk/RustDesk.toml`\r\n\r\nFor Windows, the configuration file is located at:\r\n\r\n-   `C:\\Users\\username\\AppData\\Roaming\\RustDesk\\config\\RustDesk.toml`\r\n\r\nWhen running in service mode in Windows, specified by `--service` :\r\n\r\n-   `C:\\Windows\\ServiceProfiles\\LocalService\\AppData\\Roaming\\RustDesk\\config\\RustDesk.toml`\r\n\r\n## Features\r\n-   Generate encrypted custom ID\r\n-   Decrypt and validate encrypted ID\r\n-   Use UUID as the encryption and decryption key\r\n\r\n## Usage\r\n\r\n### Get UUID\r\n\r\n\u003e   You can get more information at the official tool [machine-uid](https://github.com/rustdesk-org/machine-uid)\r\n\r\n1.  **Windows:**\r\n\r\n    -   Press `Win + R` to open the Run dialog box.\r\n    -   Type `regedit` and press Enter to open the Registry Editor.\r\n    -   Navigate to `HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Cryptography`.\r\n    -   Copy the `MachineGuid` value as the `uuid` parameter.\r\n\r\n2.  **MacOS:**\r\n\r\n    -   Open Terminal.\r\n    -   Enter the following command: `ioreg -rd1 -c IOPlatformExpertDevice | grep IOPlatformUUID`\r\n    -   Copy the UUID from the output as the `uuid` parameter.\r\n\r\n### Validate UUID\r\n\r\n1.  Clone the code locally.\r\n2.  Find the `enc_id` field in the respective configuration file.\r\n3.  Run the command `cargo run -- --eid $enc_id --uuid $uuid`.\r\n4.  The program will output the decrypted ID, compare it with the current ID to check consistency.\r\n\r\n### Customize ID\r\n\r\n1.  Clone the code locally.\r\n2.  Run the command `cargo run -- --eid $custom_id --uuid $uuid`.\r\n3.  The program will output the encrypted ID, copy and replace it in the `enc_id` field of the configuration file.\r\n\r\nExample of program execution:\r\n\r\n```shell\r\ncargo run -- --id 123456 --uuid 12345678-1234-1234-1234-123456789012\r\n```\r\n\r\n## Encryption Process\r\n\r\nThis program uses the `crypto::secretbox` module in the `sodiumoxide` library for symmetric encryption. The encryption key comes from the provided UUID string.\r\n\r\n1.  Convert the custom ID string into a byte array.\r\n2.  Convert the UUID string into a byte array and adjust its size to match the key length requirement.\r\n3.  Use the `sodiumoxide::crypto::secretbox` module to create a key and `nonce`.\r\n4.  Choose encryption or decryption operation based on the `encrypt` parameter.\r\n5.  Use the `secretbox::seal` or `secretbox::open` function for encryption or decryption.\r\n6.  Convert the encrypted byte array to a `base64` encoded string and output it to the console.\r\n\r\n## Contributing\r\n\r\nYou are welcome to contribute to this project! You can participate in the following ways:\r\n\r\n-   Submit code patches or issue reports\r\n-   Provide feedback and suggestions\r\n-   Help promote the project\r\n\r\n## Contact\r\n\r\nIf you have any questions, feel free to discuss on [github issue](https://github.com/Jxpro/custom-rustdesk/issues), or send an email to [jxpro@qq.com](mailto:jxpro@qq.com) to contact me.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjxpro%2Fcustom-rustdesk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjxpro%2Fcustom-rustdesk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjxpro%2Fcustom-rustdesk/lists"}