Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't make it working with Shadowsocks proxy #17605

Closed
quicktrick opened this issue Sep 18, 2018 · 2 comments
Closed

Can't make it working with Shadowsocks proxy #17605

quicktrick opened this issue Sep 18, 2018 · 2 comments

Comments

@quicktrick
Copy link

@quicktrick quicktrick commented Sep 18, 2018

Hello! Windows 10, Shadowsocks proxy client.

When I bypass the proxy with --proxy "" option, everything is working fine:

[debug] User config: []
[debug] Custom config: ['--proxy', '', '-o', 'd:\\Movies\\tmp\\%(autonumber)s. %(title)s.%(ext)s', '--autonumber-start', '1', '-a', 'urls.txt', '-f', 'mp4', '--no-part', '--external-downloader-args', '-v quiet -stats', '-v']
[debug] Command-line args: ['--config-location', 'config.txt']
[debug] Batch file urls: ['https://rutube.ru/video/65f3d059291746d2e85e3a4f52f085b6']
[debug] Encodings: locale cp1251, fs mbcs, out cp866, pref cp1251
[debug] youtube-dl version 2018.09.18
[debug] Python version 3.4.4 (CPython) - Windows-10-10.0.17134
[debug] exe versions: ffmpeg N-91972-gbd10c1e9a8, ffprobe N-91972-gbd10c1e9a8
[debug] Proxy map: {}
[rutube] 65f3d059291746d2e85e3a4f52f085b6: Downloading video JSON
[rutube] 65f3d059291746d2e85e3a4f52f085b6: Downloading options JSON
[rutube] 65f3d059291746d2e85e3a4f52f085b6: Downloading f4m manifest
[rutube] 65f3d059291746d2e85e3a4f52f085b6: Downloading f4m manifest
[rutube] 65f3d059291746d2e85e3a4f52f085b6: Downloading f4m manifest
[rutube] 65f3d059291746d2e85e3a4f52f085b6: Downloading f4m manifest
[rutube] 65f3d059291746d2e85e3a4f52f085b6: Downloading f4m manifest
[rutube] 65f3d059291746d2e85e3a4f52f085b6: Downloading m3u8 information
[debug] Invoking downloader on 'http://video-1-3.rutube.ru/hls-vod/Tr1zbHK9tqoEUsXU5mBLqg/1537303086/131/0x5000cca24dd3a4db/fa27e3bcb5b747d98c27e472dea4e04e.mp4.m3u8?i=1280x720_3789'
[download] Destination: d:\Movies\tmp\00001. Орел и решка - Анталия. Турция.mp4
[debug] ffmpeg command line: ffmpeg -y -loglevel verbose -v quiet -stats -headers "Accept-Encoding: gzip, deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Cookie: ea=43; eg=2; ipp_uid1=1537281485227; ipp_uid2=qlHYAUIMtGOpkHRD/hLpiKnQ4sijGyAcF9rPQ3A==; rerf=AAAAAFuhDc1IZ3RHAwVyAg==
Accept-Language: en-us,en;q=0.5
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:59.0) Gecko/20100101 Firefox/59.0
" -i "http://video-1-3.rutube.ru/hls-vod/Tr1zbHK9tqoEUsXU5mBLqg/1537303086/131/0x5000cca24dd3a4db/fa27e3bcb5b747d98c27e472dea4e04e.mp4.m3u8?i=1280x720_3789" -c copy -f mp4 "-bsf:a" aac_adtstoasc "file:d:\Movies\tmp\00001. Орел и решка - Анталия. Турция.mp4"
ffmpeg version N-91972-gbd10c1e9a8 Copyright (c) 2000-2018 the FFmpeg developers
  built with gcc 8.2.1 (GCC) 20180813
  configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth
  libavutil      56. 19.101 / 56. 19.101
  libavcodec     58. 30.100 / 58. 30.100
  libavformat    58. 18.101 / 58. 18.101
  libavdevice    58.  4.103 / 58.  4.103
  libavfilter     7. 32.100 /  7. 32.100
  libswscale      5.  2.100 /  5.  2.100
  libswresample   3.  2.100 /  3.  2.100
  libpostproc    55.  2.100 / 55.  2.100
frame=  498 fps=127 q=-1.0 size=    9216kB time=00:00:19.99 bitrate=3776.5kbits/s speed= 5.1x

When I omit any proxy option or use anything like --proxy socks5://127.0.0.1:1080, it doesn't work at all.

No proxy option (it uses the system proxy, which is the Shadowsocks client):

[debug] System config: []
[debug] User config: []
[debug] Custom config: ['-o', 'd:\\Movies\\tmp\\%(autonumber)s. %(title)s.%(ext)s', '--autonumber-start', '1', '-a', 'urls.txt', '-f', 'mp4', '--no-part', '--external-downloader-args', '-v quiet -stats', '-v']
[debug] Command-line args: ['--config-location', 'config.txt']
[debug] Batch file urls: ['https://rutube.ru/video/65f3d059291746d2e85e3a4f52f085b6']
[debug] Encodings: locale cp1251, fs mbcs, out cp866, pref cp1251
[debug] youtube-dl version 2018.09.18
[debug] Python version 3.4.4 (CPython) - Windows-10-10.0.17134
[debug] exe versions: ffmpeg N-91972-gbd10c1e9a8, ffprobe N-91972-gbd10c1e9a8
[debug] Proxy map: {'http': 'http://127.0.0.1:1080', 'https': 'https://127.0.0.1:1080'}
[rutube] 65f3d059291746d2e85e3a4f52f085b6: Downloading video JSON
[rutube] 65f3d059291746d2e85e3a4f52f085b6: Downloading options JSON
ERROR: Unable to download JSON metadata: HTTP Error 404: NOT FOUND (caused by HTTPError()); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpipjeparb\build\youtube_dl\extractor\common.py", line 604, in _request_webpage
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpipjeparb\build\youtube_dl\YoutubeDL.py", line 2211, in urlopen
  File "C:\Python\Python34\lib\urllib\request.py", line 470, in open
  File "C:\Python\Python34\lib\urllib\request.py", line 580, in http_response
  File "C:\Python\Python34\lib\urllib\request.py", line 508, in error
  File "C:\Python\Python34\lib\urllib\request.py", line 442, in _call_chain
  File "C:\Python\Python34\lib\urllib\request.py", line 588, in http_error_default

--proxy socks5://127.0.0.1:1080 option:

[debug] System config: []
[debug] User config: []
[debug] Custom config: ['--proxy', 'socks5://127.0.0.1:1080', '-o', 'd:\\Movies\\tmp\\%(autonumber)s. %(title)s.%(ext)s', '--autonumber-start', '1', '-a', 'urls.txt', '-f', 'mp4', '--no-part', '--external-downloader-args', '-v quiet -stats', '-v']
[debug] Command-line args: ['--config-location', 'config.txt']
[debug] Batch file urls: ['https://rutube.ru/video/65f3d059291746d2e85e3a4f52f085b6']
[debug] Encodings: locale cp1251, fs mbcs, out cp866, pref cp1251
[debug] youtube-dl version 2018.09.18
[debug] Python version 3.4.4 (CPython) - Windows-10-10.0.17134
[debug] exe versions: ffmpeg N-91972-gbd10c1e9a8, ffprobe N-91972-gbd10c1e9a8
[debug] Proxy map: {'http': 'socks5://127.0.0.1:1080', 'https': 'socks5://127.0.0.1:1080'}
[rutube] 65f3d059291746d2e85e3a4f52f085b6: Downloading video JSON
[rutube] 65f3d059291746d2e85e3a4f52f085b6: Downloading options JSON
ERROR: Unable to download JSON metadata: HTTP Error 404: NOT FOUND (caused by HTTPError()); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpipjeparb\build\youtube_dl\extractor\common.py", line 604, in _request_webpage
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpipjeparb\build\youtube_dl\YoutubeDL.py", line 2211, in urlopen
  File "C:\Python\Python34\lib\urllib\request.py", line 470, in open
  File "C:\Python\Python34\lib\urllib\request.py", line 580, in http_response
  File "C:\Python\Python34\lib\urllib\request.py", line 508, in error
  File "C:\Python\Python34\lib\urllib\request.py", line 442, in _call_chain
  File "C:\Python\Python34\lib\urllib\request.py", line 588, in http_error_default

Shadowsocks itself is working fine with any browser. What am I doing wrong?

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Sep 18, 2018

http://rutube.ru/api/play/options/ endpoint returns geo restriction error for your proxy.

@dstftw dstftw closed this Sep 18, 2018
@quicktrick
Copy link
Author

@quicktrick quicktrick commented Sep 18, 2018

Thanks a lot, @dstftw

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.