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

https proxy self-sign certificate still has problem #830

Closed
ghost opened this issue May 9, 2013 · 7 comments
Closed

https proxy self-sign certificate still has problem #830

ghost opened this issue May 9, 2013 · 7 comments
Labels

Comments

@ghost
Copy link

@ghost ghost commented May 9, 2013

what outputs ?

[isme@mycomputer ~]$ ###### no proxy ######
[isme@mycomputer ~]$ env | grep http
[isme@mycomputer ~]$
[isme@mycomputer ~]$ ###### yutube is blocked by GFW ######
[isme@mycomputer ~]$ youtube-dl -v http://www.youtube.com/watch?v=nZcRU0Op5P4
[debug] System config: []
[debug] User config: []
[debug] Command-line args: ['-v', 'http://www.youtube.com/watch?v=nZcRU0Op5P4']
[debug] youtube-dl version 2013.05.05
[debug] Python version 3.3.1 - Linux-3.8.11-1-ARCH-i686-with-arch
[debug] Proxy map: {}
[youtube] Setting language
WARNING: unable to set language: urlopen error [Errno 101] Network is unreachable
[youtube] nZcRU0Op5P4: Downloading video webpage
^C
ERROR: Interrupted by user
[isme@mycomputer ~]$
[isme@mycomputer ~]$ ###### network is working by testing youku ######
[isme@mycomputer ~]$ youtube-dl http://v.youku.com/v_show/id_XNTUzNzc3MjI0.html
[Youku] XNTUzNzc3MjI0: Downloading webpage
[Youku] XNTUzNzc3MjI0: Extracting information
[download] Destination: 郑钧炮轰陈奕迅分裂 eason气到黑脸甩椅-XNTUzNzc3MjI0_part00.flv
[download] 100.0% of 10.70MiB at 581.16KiB/s ETA 00:00
[isme@mycomputer ~]$
[isme@mycomputer ~]$ ###### export the self-sign certificate proxy (APJP) ######
[isme@mycomputer ~]$ export http_proxy=http://127.0.0.1:10000
[isme@mycomputer ~]$ env | grep http
http_proxy=http://127.0.0.1:10000

[isme@mycomputer ~]$ ###### can download http video ######
[isme@mycomputer ~]$ rm 郑钧炮轰陈奕迅分裂\ eason气到黑脸甩椅-XNTUzNzc3MjI0_part00.flv
[isme@mycomputer ~]$ youtube-dl -v http://v.youku.com/v_show/id_XNTUzNzc3MjI0.html
[debug] System config: []
[debug] User config: []
[debug] Command-line args: ['-v', 'http://v.youku.com/v_show/id_XNTUzNzc3MjI0.html']
[debug] youtube-dl version 2013.05.05
[debug] Python version 3.3.1 - Linux-3.8.11-1-ARCH-i686-with-arch
[debug] Proxy map: {'https': 'http://127.0.0.1:10000', 'http': 'http://127.0.0.1:10000'}
[Youku] XNTUzNzc3MjI0: Downloading webpage
[Youku] XNTUzNzc3MjI0: Extracting information
[download] Destination: 郑钧炮轰陈奕迅分裂 eason气到黑脸甩椅-XNTUzNzc3MjI0_part00.flv
[download] 15.4% of 10.70MiB at 141.91KiB/s ETA 01:05^C
ERROR: Interrupted by user
[isme@mycomputer ~]$
[isme@mycomputer ~]$ ###### without --no-check-certificate ######
[isme@mycomputer ~]$ youtube-dl -v http://www.youtube.com/watch?v=nZcRU0Op5P4
[debug] System config: []
[debug] User config: []
[debug] Command-line args: ['-v', 'http://www.youtube.com/watch?v=nZcRU0Op5P4']
[debug] youtube-dl version 2013.05.05
[debug] Python version 3.3.1 - Linux-3.8.11-1-ARCH-i686-with-arch
[debug] Proxy map: {'http': 'http://127.0.0.1:10000', 'https': 'http://127.0.0.1:10000'}
[youtube] Setting language
WARNING: unable to set language: urlopen error [SSL: TLSV1_ALERT_INTERNAL_ERROR] tlsv1 alert internal error (_ssl.c:547)
[youtube] nZcRU0Op5P4: Downloading video webpage
ERROR: unable to download video webpage: urlopen error [SSL: TLSV1_ALERT_INTERNAL_ERROR] tlsv1 alert internal error (_ssl.c:547)
Traceback (most recent call last):
File "/usr/lib/python3.3/urllib/request.py", line 1252, in do_open
h.request(req.get_method(), req.selector, req.data, headers)
File "/usr/lib/python3.3/http/client.py", line 1061, in request
self._send_request(method, url, body, headers)
File "/usr/lib/python3.3/http/client.py", line 1099, in _send_request
self.endheaders(body)
File "/usr/lib/python3.3/http/client.py", line 1057, in endheaders
self._send_output(message_body)
File "/usr/lib/python3.3/http/client.py", line 902, in _send_output
self.send(msg)
File "/usr/lib/python3.3/http/client.py", line 840, in send
self.connect()
File "/usr/lib/python3.3/http/client.py", line 1202, in connect
server_hostname=server_hostname)
File "/usr/lib/python3.3/ssl.py", line 210, in wrap_socket
_context=self)
File "/usr/lib/python3.3/ssl.py", line 310, in init
raise x
File "/usr/lib/python3.3/ssl.py", line 306, in init
self.do_handshake()
File "/usr/lib/python3.3/ssl.py", line 513, in do_handshake
self._sslobj.do_handshake()
ssl.SSLError: [SSL: TLSV1_ALERT_INTERNAL_ERROR] tlsv1 alert internal error (_ssl.c:547)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/lib/python3.3/site-packages/youtube_dl/InfoExtractors.py", line 498, in _real_extract
video_webpage_bytes = compat_urllib_request.urlopen(request).read()
File "/usr/lib/python3.3/urllib/request.py", line 160, in urlopen
return opener.open(url, data, timeout)
File "/usr/lib/python3.3/urllib/request.py", line 473, in open
response = self._open(req, data)
File "/usr/lib/python3.3/urllib/request.py", line 491, in _open
'_open', req)
File "/usr/lib/python3.3/urllib/request.py", line 451, in _call_chain
result = func(*args)
File "/usr/lib/python3.3/urllib/request.py", line 1287, in https_open
context=self._context, check_hostname=self._check_hostname)
File "/usr/lib/python3.3/urllib/request.py", line 1255, in do_open
raise URLError(err)
urllib.error.URLError: urlopen error [SSL: TLSV1_ALERT_INTERNAL_ERROR] tlsv1 alert internal error (_ssl.c:547)
[isme@mycomputer ~]$
[isme@mycomputer ~]$ ###### check the option ######
[isme@mycomputer ~]$ youtube-dl -h | grep certificate
--no-check-certificate Suppress HTTPS certificate validation.
[isme@mycomputer ~]$
[isme@mycomputer ~]$ ###### with --no-check-certificate ######
[isme@mycomputer ~]$ youtube-dl -v --no-check-certificate http://www.youtube.com/watch?v=nZcRU0Op5P4
[debug] System config: []
[debug] User config: []
[debug] Command-line args: ['-v', '--no-check-certificate', 'http://www.youtube.com/watch?v=nZcRU0Op5P4']
[debug] youtube-dl version 2013.05.05
[debug] Python version 3.3.1 - Linux-3.8.11-1-ARCH-i686-with-arch
[debug] Proxy map: {'https': 'http://127.0.0.1:10000', 'http': 'http://127.0.0.1:10000'}
[youtube] Setting language
WARNING: unable to set language: urlopen error [SSL: TLSV1_ALERT_INTERNAL_ERROR] tlsv1 alert internal error (_ssl.c:547)
[youtube] nZcRU0Op5P4: Downloading video webpage
ERROR: unable to download video webpage: urlopen error [SSL: TLSV1_ALERT_INTERNAL_ERROR] tlsv1 alert internal error (_ssl.c:547)
Traceback (most recent call last):
File "/usr/lib/python3.3/urllib/request.py", line 1252, in do_open
h.request(req.get_method(), req.selector, req.data, headers)
File "/usr/lib/python3.3/http/client.py", line 1061, in request
self._send_request(method, url, body, headers)
File "/usr/lib/python3.3/http/client.py", line 1099, in _send_request
self.endheaders(body)
File "/usr/lib/python3.3/http/client.py", line 1057, in endheaders
self._send_output(message_body)
File "/usr/lib/python3.3/http/client.py", line 902, in _send_output
self.send(msg)
File "/usr/lib/python3.3/http/client.py", line 840, in send
self.connect()
File "/usr/lib/python3.3/http/client.py", line 1202, in connect
server_hostname=server_hostname)
File "/usr/lib/python3.3/ssl.py", line 210, in wrap_socket
_context=self)
File "/usr/lib/python3.3/ssl.py", line 310, in init
raise x
File "/usr/lib/python3.3/ssl.py", line 306, in init
self.do_handshake()
File "/usr/lib/python3.3/ssl.py", line 513, in do_handshake
self._sslobj.do_handshake()
ssl.SSLError: [SSL: TLSV1_ALERT_INTERNAL_ERROR] tlsv1 alert internal error (_ssl.c:547)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/lib/python3.3/site-packages/youtube_dl/InfoExtractors.py", line 498, in _real_extract
video_webpage_bytes = compat_urllib_request.urlopen(request).read()
File "/usr/lib/python3.3/urllib/request.py", line 160, in urlopen
return opener.open(url, data, timeout)
File "/usr/lib/python3.3/urllib/request.py", line 473, in open
response = self._open(req, data)
File "/usr/lib/python3.3/urllib/request.py", line 491, in _open
'_open', req)
File "/usr/lib/python3.3/urllib/request.py", line 451, in _call_chain
result = func(*args)
File "/usr/lib/python3.3/urllib/request.py", line 1287, in https_open
context=self._context, check_hostname=self._check_hostname)
File "/usr/lib/python3.3/urllib/request.py", line 1255, in do_open
raise URLError(err)
urllib.error.URLError: urlopen error [SSL: TLSV1_ALERT_INTERNAL_ERROR] tlsv1 alert internal error (_ssl.c:547)
[isme@mycomputer ~]$
[isme@mycomputer ~]$ ###### export https proxy ######
[isme@mycomputer ~]$ export https_proxy=https://127.0.0.1:10000
[isme@mycomputer ~]$ env | grep http
http_proxy=http://127.0.0.1:10000
https_proxy=https://127.0.0.1:10000
[isme@mycomputer ~]$ 
[isme@mycomputer ~]$ youtube-dl -v --no-check-certificate http://www.youtube.com/watch?v=nZcRU0Op5P4
[debug] System config: []
[debug] User config: []
[debug] Command-line args: ['-v', '--no-check-certificate', 'http://www.youtube.com/watch?v=nZcRU0Op5P4']
[debug] youtube-dl version 2013.05.05
[debug] Python version 3.3.1 - Linux-3.8.11-1-ARCH-i686-with-arch
[debug] Proxy map: {'https': 'https://127.0.0.1:10000', 'http': 'http://127.0.0.1:10000'}
[youtube] Setting language
WARNING: unable to set language: urlopen error [SSL: TLSV1_ALERT_INTERNAL_ERROR] tlsv1 alert internal error (_ssl.c:547)
[youtube] nZcRU0Op5P4: Downloading video webpage
ERROR: unable to download video webpage: urlopen error [SSL: TLSV1_ALERT_INTERNAL_ERROR] tlsv1 alert internal error (_ssl.c:547)
Traceback (most recent call last):
  File "/usr/lib/python3.3/urllib/request.py", line 1252, in do_open
    h.request(req.get_method(), req.selector, req.data, headers)
  File "/usr/lib/python3.3/http/client.py", line 1061, in request
    self._send_request(method, url, body, headers)
  File "/usr/lib/python3.3/http/client.py", line 1099, in _send_request
    self.endheaders(body)
  File "/usr/lib/python3.3/http/client.py", line 1057, in endheaders
    self._send_output(message_body)
  File "/usr/lib/python3.3/http/client.py", line 902, in _send_output
    self.send(msg)
  File "/usr/lib/python3.3/http/client.py", line 840, in send
    self.connect()
  File "/usr/lib/python3.3/http/client.py", line 1202, in connect
    server_hostname=server_hostname)
  File "/usr/lib/python3.3/ssl.py", line 210, in wrap_socket
    _context=self)
  File "/usr/lib/python3.3/ssl.py", line 310, in init
    raise x
  File "/usr/lib/python3.3/ssl.py", line 306, in init
    self.do_handshake()
  File "/usr/lib/python3.3/ssl.py", line 513, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLError: [SSL: TLSV1_ALERT_INTERNAL_ERROR] tlsv1 alert internal error (_ssl.c:547)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.3/site-packages/youtube_dl/InfoExtractors.py", line 498, in _real_extract
    video_webpage_bytes = compat_urllib_request.urlopen(request).read()
  File "/usr/lib/python3.3/urllib/request.py", line 160, in urlopen
    return opener.open(url, data, timeout)
  File "/usr/lib/python3.3/urllib/request.py", line 473, in open
    response = self._open(req, data)
  File "/usr/lib/python3.3/urllib/request.py", line 491, in _open
    '_open', req)
  File "/usr/lib/python3.3/urllib/request.py", line 451, in _call_chain
    result = func(*args)
  File "/usr/lib/python3.3/urllib/request.py", line 1287, in https_open
    context=self._context, check_hostname=self._check_hostname)
  File "/usr/lib/python3.3/urllib/request.py", line 1255, in do_open
    raise URLError(err)
urllib.error.URLError: urlopen error [SSL: TLSV1_ALERT_INTERNAL_ERROR] tlsv1 alert internal error (_ssl.c:547)

what problem ?
#814 I said it's ok. I think it's because I was using the self-sign certificate http proxy and another https proxy at the same time with privoxy to combine the setting like this:

forward / 127.0.0.1:10000
forward-socks5 :443/ 127.0.0.1:1080 .
Today I only use the self-sign certificate http proxy, so can see the problem is still here.

@phihag
Copy link
Contributor

@phihag phihag commented May 9, 2013

Mmm, looking at the error message, this might not actually be a certification failed error, but caused by a broken TLS implementation. Thanks for reporting - this is with GoAgent, right?

@ghost
Copy link
Author

@ghost ghost commented May 9, 2013

@phihag
Copy link
Contributor

@phihag phihag commented May 9, 2013

There seem to be 3 different implementations of APJP in different languages. Which one of those are you using? Is there a guide you followed on how to set it up?

@ghost
Copy link
Author

@ghost ghost commented May 10, 2013

remote server: google app engine + java
locale client: java
deploy and setup following wiki in http://apjp.googlecode.com

@ghost
Copy link
Author

@ghost ghost commented May 21, 2013

Goagent does pass the certificate. I think it's something special in APJP. You can close this issue. Thanks.

@InfiniteStyles
Copy link

@InfiniteStyles InfiniteStyles commented Nov 6, 2016

This issue should probably be closed.

@yan12125 yan12125 closed this Nov 7, 2016
@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Nov 7, 2016

Closing as it's most likely an APJP issue

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
3 participants
You can’t perform that action at this time.