{"id":16724682,"url":"https://github.com/eswzy/webvpn-dlut","last_synced_at":"2025-04-30T22:24:00.061Z","repository":{"id":54569896,"uuid":"248271406","full_name":"ESWZY/webvpn-dlut","owner":"ESWZY","description":"WRD 的 WebVPN 的 URL 互转原理🌚","archived":false,"fork":false,"pushed_at":"2024-05-26T15:42:31.000Z","size":24,"stargazers_count":72,"open_issues_count":1,"forks_count":13,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-12T11:40:51.786Z","etag":null,"topics":["python","webvpn"],"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/ESWZY.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":"2020-03-18T15:33:45.000Z","updated_at":"2025-02-05T14:51:47.000Z","dependencies_parsed_at":"2024-01-16T23:30:11.802Z","dependency_job_id":"669d8c89-6ab0-4ba5-adba-24bddc950f09","html_url":"https://github.com/ESWZY/webvpn-dlut","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/ESWZY%2Fwebvpn-dlut","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ESWZY%2Fwebvpn-dlut/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ESWZY%2Fwebvpn-dlut/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ESWZY%2Fwebvpn-dlut/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ESWZY","download_url":"https://codeload.github.com/ESWZY/webvpn-dlut/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251790425,"owners_count":21644216,"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":["python","webvpn"],"created_at":"2024-10-12T22:46:17.401Z","updated_at":"2025-04-30T22:24:00.042Z","avatar_url":"https://github.com/ESWZY.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# webvpn-dlut\n\n`webvpn.dlut.edu.cn`是 DUT 的 WebVPN，提供了从校外访问校园网环境资源的接口，可供访问校内资源。\n\n但是登录后，由于链接为加密状态，仅能访问该系统门户所提供的站点。\n\n正巧最近的课程涉及到该链接编制方式，用 Python 实现加密链接与普通链接的转换方式。\n\n经查，该系统为[网瑞达科技](https://www.wrdtech.com/content/content.php?p=2_30_203)的资源访问控制系统（WebVPN），并使用了`Wxzxvpn2023key@$`（原为`wrdvpnisthebest!`）作为 key 和 iv。\n\n加密方法：*AES-128-CFB*\n\n## 部署\n\n安装依赖库：\n\n```bash\npip install -r requirements.txt\n```\n\n## 使用\n\n通过`--encode`（可简写为`-e`）参数将普通网址转换为通过 WebVPN 访问的网址：\n\n```bash\npython webvpn.py --encode \u003curl\u003e\n```\n\n通过`--decode`（可简写为`-d`）参数将通过 WebVPN 访问的网址转换为普通网址：\n\n```bash\npython webvpn.py --decode \u003curl\u003e\n```\n\n可选参数：\n- `--key`：指定加解密的 key。\n- `--iv`：指定加解密的 iv。\n- `--institution`（可简写为`-i`）：指定 WebVPN 系统的域名（仅`encode`模式生效，默认即`webvpn.dlut.edu.cn`）。\n\n## 代码结构\n\n源代码为 Python 文件：`webvpn.py`\n\n代码分为四个函数：\n\n```python\ngetCiphertext(plaintext, key, cfb_iv, size = 128)       # 利用明文生成密文\ngetPlaintext(ciphertext, key, cfb_iv, size = 128)       # 利用密文得到明文\ngetVPNUrl(url)          # 将普通网址转换为通过 WebVPN 访问的网址\ngetOrdinaryUrl(url)     # 将通过 WebVPN 访问的网址转换为普通网址\n```\n\n## 参见\n\n[webvpn4dut](https://github.com/cjhahaha/webvpn4dut)：JavaScript「实现」的 WebVPN 链接转换。\n\n[dlut-survival-tools](https://github.com/BeautyYuYanli/dlut-survival-tools)：与大连理工大学相关的工具收集。\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feswzy%2Fwebvpn-dlut","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feswzy%2Fwebvpn-dlut","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feswzy%2Fwebvpn-dlut/lists"}