{"id":27118434,"url":"https://github.com/suconghou/netdisk","last_synced_at":"2025-04-07T07:58:02.655Z","repository":{"id":57616754,"uuid":"52713753","full_name":"suconghou/netdisk","owner":"suconghou","description":"download tool \u0026 baidu netdisk","archived":false,"fork":false,"pushed_at":"2023-10-09T07:34:46.000Z","size":140,"stargazers_count":11,"open_issues_count":0,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-06-20T09:34:14.038Z","etag":null,"topics":["downloader","golang","multi-threading","proxy"],"latest_commit_sha":null,"homepage":"","language":"Go","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/suconghou.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":"2016-02-28T09:25:35.000Z","updated_at":"2022-03-23T13:30:33.000Z","dependencies_parsed_at":"2024-06-20T08:38:16.047Z","dependency_job_id":"774a3cab-f91b-494f-8871-89e40f4d49b0","html_url":"https://github.com/suconghou/netdisk","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/suconghou%2Fnetdisk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/suconghou%2Fnetdisk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/suconghou%2Fnetdisk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/suconghou%2Fnetdisk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/suconghou","download_url":"https://codeload.github.com/suconghou/netdisk/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247615474,"owners_count":20967183,"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":["downloader","golang","multi-threading","proxy"],"created_at":"2025-04-07T07:58:01.745Z","updated_at":"2025-04-07T07:58:02.455Z","avatar_url":"https://github.com/suconghou.png","language":"Go","readme":"# netdisk\n\n\nbaidu netdisk use pcs api\n\nand with some useful tools\n\n### usage\n\n\nconfig file\n\non unix  `/etc/disk.json` and use `mpv` player\n\non windows  `C:\\Users\\Default\\disk.json`  and use `PotPlayerMini.exe` player\n\n\n```\ndisk info\n\ndisk info /path/to/file\n\ndisk ls\n\ndisk cd /path\n\ndisk get /path/to/file\n\ndisk put /local/file\n\ndisk rm /path/to/file\n\ndisk wget http://xxx\n\ndisk play /path/to/file\n\ndisk play http://xxx\n\ndisk hash /local/file\n\ndisk pwd\n\ndisk mv oldpath newpath\n\ndisk mkdir dirname\n\ndisk task list\n\ndisk task add / http://fileurl\n\ndisk task info taskId\n\ndisk task remove taskId\n\ndisk help\n```\n\nfast download and multithreading\n\n\n### other flag\n\n`disk put local_file -f`  fore rewrite remote file if conflicted\n\n`disk info file --link` show file info and download link ,the link can be downloaded in multithread\n\n\n```\nhttps://openapi.baidu.com/oauth/2.0/authorize?response_type=token\u0026client_id=fNThTaiSso4OtkgTsbtiFpyt\u0026redirect_uri=oob\u0026scope=netdisk\n```\n\n\n## Static File Server\n\n`disk serve` start a static file server \n\n`disk serve -h` see help\n\n`-p` set the listen port\n\n`-d` set the document root\n\n\u003e directory list is enabled by default\n\n## Wget Download\n\n`disk wget http://url`\n\nlike wget but only for http/https \n\nIt is multithreading and with awesome features\n\n### http header control\n\n`--cookie \"cookie string\"`\n\n`--refer \"http refer string\"`\n\n`--ua \"user agent string\"`\n\n### range control\n\nuse `--range:1230-123456` or `--range:1230-` to force get certain range content\n\nyou also can use\n```\ndisk wget url --range:0-88000\ndisk wget url --range:88000-988000\ndisk wget url --range:988000-\n```\nthus will not break your file which just like `disk wget url`\n\n### speed control\n\n`--fast/--slow` `--fat/--thin` can be used for speed control\n\nfor thread \n\ndefault thread is 8\n```\ndisk wget url --fast // up to 16 thread\ndisk wget url --slow // set to 4 thread\n```\n\nfor chunk\n\ndefault chunk is 2097152 (2MB)\n```\ndisk wget url --fat // set to 8MB\ndisk wget url --thin // set to 256KB\n```\n\n## Play Url Video\n\n`disk play url`\n\nis like wget download but have another two features\n\n### It call video player automatically\n\nIt calls player once download \u003e 2%\n\non unix use `mpv` player\n\non windows use `PotPlayerMini.exe` player\n\nthose commands should be called directly or \nit will failed silently\n\n### It can write data to stdout rather than file\n\nuse `--stdout` to write data to stdout ranther than file\n\nfor example \n\nuse another player to play\n\n`disk play url --stdout | ffplay -i -`\n\nwrite to stdout for gzip or xz decode play \n\n`disk play url --stdout | gzip -d | mpv  -`\n\nplay exist file but the remain data download to stdout to play\n\n`(cat a.flv \u0026\u0026 disk play /test/a.flv --stdout) | mpv -`\n\n\n## Proxy \n\n`disk proxy` \n\n`disk reverse`\n\n### Reverse Proxy\n\n`disk reverse` start a reverse proxy server\n\nit is like nginx reverse proxy , but can work with upstream proxy\n\n`disk reverse -h` see help\n\n`-u` is your reverse proxy url aka proxy_pass url\n\n\u003e it can be any url http/https or with uri\n\n`-p` is the server port, default 8123\n\n#### Reverse Proxy With Upstream Proxy\n\n`-proxy` to use an upstream http(s) proxy\n\n\u003e `-proxy http://your_http_proxy:6056` or `-proxy https://your_http_proxy:6056` \n\n`-socks` to use an upstream socks5 proxy\n\n\u003e `-socks 127.0.0.1:1080`\n\n**`-socks` is used if both proxy are configured**\n\n\u003e if your proxy is only http_proxy proxy then you can only proxy http backend (no https backend) \n\n\n\n### Forward Proxy\n\n`disk proxy` start a http/https/socks5 proxy server \n\n`disk proxy -h` see help\n\n`-p` is the proxy server port, default 8123\n\n#### http(s) proxy\n\n`disk proxy` start the server can be used as a http proxy and https proxy server\n\n#### socks5 proxy\n\n`disk proxy` start the server can be used as a socks5 proxy server\n\n#### socks5 to http(s) proxy\n\nuse `-socks` to set an upstream socks5 proxy\n\nwhich all the proxy request(http/https/socks5) will pass to \n\n## Network\n\n\n`disk network` test download speed for given url \n\n`echo http://xxx.com/filepath  | tdisk network -s 0 -t 10`  \n`-s 0` for unlimit filesize\n\ntest for ip with one host \n\n`disk network -host xxx.com -path /filepath`\n\n`-path` begin with `/`\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsuconghou%2Fnetdisk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsuconghou%2Fnetdisk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsuconghou%2Fnetdisk/lists"}