{"id":20687774,"url":"https://github.com/klauer/ads-proxy","last_synced_at":"2025-08-01T02:07:44.703Z","repository":{"id":72187021,"uuid":"205245812","full_name":"klauer/ads-proxy","owner":"klauer","description":"[WIP] TwinCAT ADS tunneling over SSH (or maybe docker container NAT)","archived":false,"fork":false,"pushed_at":"2019-08-29T23:55:05.000Z","size":3,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-17T16:52:19.091Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","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/klauer.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":"2019-08-29T20:31:57.000Z","updated_at":"2019-08-29T23:55:07.000Z","dependencies_parsed_at":"2023-05-31T06:45:44.994Z","dependency_job_id":null,"html_url":"https://github.com/klauer/ads-proxy","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/klauer%2Fads-proxy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/klauer%2Fads-proxy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/klauer%2Fads-proxy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/klauer%2Fads-proxy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/klauer","download_url":"https://codeload.github.com/klauer/ads-proxy/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242945840,"owners_count":20210762,"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":[],"created_at":"2024-11-16T22:58:11.917Z","updated_at":"2025-03-10T23:58:53.135Z","avatar_url":"https://github.com/klauer.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"adsproxy\n--------\n\n\nProof-of-concept\n\n\nSetup\n-----\n\nTunnel through SSH\n\nConfigure port forwarding using a server with a route already existing on the\nPLC. That is, in ~/.ssh/config:\n\n```\nHost host_with_route_on_plc\n    LocalForward 50000 plc_ip:48898\n```\n\nEdit and run test.py to intercept ADS requests made to your local machine (port\n48898):\n\n```sh\n$ python test.py\n```\n\nRun an additional ADS client script to tunnel through SSH, fixing up your source\nAMS ID without any client-side modifications:\n\n```python\nimport os\nos.environ['DYLD_LIBRARY_PATH'] = '/Users/klauer/docs/Repos/pyads/adslib'\n\nimport pyads\n\n# plc_remote_ip = '172.21.148.145'  # \u003c-- actual IP\nplc_remote_ip = '127.0.0.1'         # \u003c-- tunnel\nplc_remote_net_id = '172.21.148.145.1.1'\n\nplc = pyads.Connection(plc_remote_net_id, 851, plc_remote_ip)\nplc.open()\n\nprint(plc.read_device_info())\n```\n\n```sh\n$ python client.py\n2019-08-29T13:28:53-0700 Info: Connected to 127.0.0.1\n('Plc30 App', \u003cpyads.structs.AdsVersion object at 0x10e93feb8\u003e)\n2019-08-29T13:28:53-0700 Info: connection closed by remote\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fklauer%2Fads-proxy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fklauer%2Fads-proxy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fklauer%2Fads-proxy/lists"}