{"id":21385898,"url":"https://github.com/gcclinux/rdt","last_synced_at":"2025-03-16T12:13:47.663Z","repository":{"id":263988601,"uuid":"891964916","full_name":"gcclinux/rdt","owner":"gcclinux","description":"RDT \"Redirect Data Traffic\" runs on a local host redirecting network traffic from local LAN address to localhost/127.0.0.1","archived":false,"fork":false,"pushed_at":"2024-12-01T10:30:54.000Z","size":2011,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-22T23:44:11.440Z","etag":null,"topics":["network","proxy"],"latest_commit_sha":null,"homepage":"https://github.com/gcclinux/rdt","language":"Go","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/gcclinux.png","metadata":{"files":{"readme":"README.md","changelog":null,"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,"publiccode":null,"codemeta":null}},"created_at":"2024-11-21T09:21:23.000Z","updated_at":"2024-12-01T10:24:08.000Z","dependencies_parsed_at":"2024-11-21T17:04:21.862Z","dependency_job_id":null,"html_url":"https://github.com/gcclinux/rdt","commit_stats":null,"previous_names":["gcclinux/rdt"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gcclinux%2Frdt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gcclinux%2Frdt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gcclinux%2Frdt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gcclinux%2Frdt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gcclinux","download_url":"https://codeload.github.com/gcclinux/rdt/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243864821,"owners_count":20360360,"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":["network","proxy"],"created_at":"2024-11-22T11:51:35.363Z","updated_at":"2025-03-16T12:13:47.638Z","avatar_url":"https://github.com/gcclinux.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# RDT\n\nRDT \"Redirect Data Traffic\" runs on a local host redirecting network traffic from local LAN address to localhost/127.0.0.1 or another other `\u003cLAN_IP_ADDRESS\u003e` that the main PC has connection too.\n\n## Requirements\n- Go 1.21 or higher\n- Linux/MacOS/Windows\n\n## Usability example\n\nThis example demonstrates how to use RDT to access GPT4All queries and LLM on the local area network when hosting GPT4All. Follow these steps to download the model, start RDT, and access it using the LAN address rather than localhost.\n\n## Download the GPT4All model\n   Download the desired model from the GPT4All repository or [website](https://docs.gpt4all.io/index.html).\n\n## Start the GPT4All server\n   Start the GPT4All server on your machine, Download your favourite LLM model!\n\n## Setup GTP4All API Server\n1. Download your favourite LLM model!\n2. Follow instructions in [GPT4All API Server](https://docs.gpt4all.io/gpt4all_api_server/home.html)\n\n\n## Starting with RDT\n   \nStarting with RDT you will need to download, build it on your machine, ensuring config.json is configured to listen on LAN network `\u003cLAN_IP_ADDRESS\u003e`.\n\n## Downloading and building RDT\n```bash\n# Clone the repository\ngit clone https://github.com/gcclinux/rdt.git\ncd rdt\n\n# Build the binary (linux)\ngo build -o rdt-$(arch)-$(uname -s)\n\n# Build the binary (windows)\ngo build -o rdt.exe\n```\n\n*The application uses config.json to define inbound and outbound connections. Create or modify the config.json file in the same directory as the binary:*\n```\n{\n    \"inbound_address\": \"192.168.0.45\",  // Address to listen on\n    \"inbound_port\": \"4891\",             // Port to listen on\n    \"outbound_address\": \"127.0.0.1\",    // Target address to forward to\n    \"outbound_port\": \"4891\",            // Target port to forward to\n    \"verbose\": \"true\"                   // Verbose set will log inbound and outbound traffic\n}\n```\n\n## Run directly with Go\n```\ngo run main.go\n```\n\n## Or run the built binary\n\n```bash\n# Linux\n./rdt-$(arch)-$(uname -s)\n\n# Windows\n./rdt.exe\n```\n\n## Access GPT4All using the LAN address\n\nReplace `localhost` with the LAN IP address of the machine hosting GPT4All. You can find the LAN IP address using the `ipconfig` command on Windows or `ifconfig`/`ip a` command on Linux/Mac.\n\n```sh\ncurl -X POST http://\u003cLAN_IP_ADDRESS\u003e:4891/v1/chat/completions -d '{\n\"model\": \"Phi-3 Mini Instruct\",\n\"messages\": [{\"role\":\"user\",\"content\":\"Who is Lionel Messi?\"}],\n\"max_tokens\": 50,\n\"temperature\": 0.28\n}'\n```\n\nReplace `\u003cLAN_IP_ADDRESS\u003e` with the actual IP address of the machine hosting GPT4All and configured as \"inbound_address\" in the config.json.\n\nBy following these steps, you can access GPT4All queries and LLM on the local area network using the LAN address.\n\n## ChangeLog\n- 1.0.0 - Initial version with single port redirect","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgcclinux%2Frdt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgcclinux%2Frdt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgcclinux%2Frdt/lists"}