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

Proxy.py broken for Android Emulators #65

Closed
abhinavsingh opened this issue Sep 3, 2019 · 1 comment
Closed

Proxy.py broken for Android Emulators #65

abhinavsingh opened this issue Sep 3, 2019 · 1 comment
Assignees
Labels
Bug Bug report in proxy server

Comments

@abhinavsingh
Copy link
Owner

Seen following logs when running Android emulator via proxy.py

2019-09-02 21:11:15,572 - INFO - pid:6909 - set_host_port:409 - b'[2607:f8b0:4005:802::2003]:443'
2019-09-02 21:11:15,572 - ERROR - pid:6909 - run:1083 - Exception while handling connection <socket.socket fd=44, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=0, laddr=('10.0.0.236', 8899), raddr=('10.0.0.236', 59065)> with reason ValueError('too many values to unpack (expected 2)')
Traceback (most recent call last):
  File "./proxy.py", line 1077, in run
    teardown = self.run_once()
  File "./proxy.py", line 1042, in run_once
    self.request.parse(client_data)
  File "./proxy.py", line 429, in parse
    more, raw = self.process(raw)
  File "./proxy.py", line 460, in process
    self.process_line(line)
  File "./proxy.py", line 501, in process_line
    self.set_host_port()
  File "./proxy.py", line 410, in set_host_port
    self.host, self.port = self.url.path.split(COLON)
ValueError: too many values to unpack (expected 2)
@abhinavsingh
Copy link
Owner Author

Android emulator seems to be expecting pretty hardcoded responses from proxy. Specifically, it only expects a 200 OK header in response to CONNECT request. Code logic can be found here https://github.com/aosp-mirror/platform_external_qemu/blob/a7c579bdcbe2543472535718d3b637cb864f6f36/proxy/proxy_common.c and https://android.googlesource.com/platform/external/qemu/+/master/proxy/proxy_http_connector.c

@abhinavsingh abhinavsingh changed the title Handle IPV6 server address in client request Proxy.py broken for Android Emulators Sep 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Bug report in proxy server
Projects
None yet
Development

No branches or pull requests

1 participant