-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
ws client demo couldn't connect to server #3125
Comments
Then I try It failed with |
Is there a way to make above examples work? I plan to do test with and without SSL. |
There seems to be a problem with tls on your platform? What is the platform + tls library? What happens with eg, lws-minimal-http-client? |
this seems caused by http proxy setting |
Just don't explicitly tell it to use the proxy, eg |
Is there a way to set whether to use proxy in lws code? |
Under some other conditions that could be super bad, eg, if the proxy is supposed to conceal the connection from a monitored normal path, we would go ahead and blab about it anyway. The best way is just not explicitly tell it to use the proxy via the environment when that isn't what you want. You can set the proxy in the context creation struct. So you if you want that flow, you can take a copy of the env proxy, unset it, and choose at context creation time whether to apply it or not. |
I try to do a ws client/server pair test but it doesn't work.
minimal-ws-client-echo and minimal-ws-server-echo, client failed with
[2024/04/30 13:19:33:7846] I: rops_handle_POLLIN_netlink: RTM 3
[2024/04/30 13:19:33:7846] I: rops_handle_POLLIN_netlink: *** Unknown RTM_3
[2024/04/30 13:19:33:7846] I: lws_http_client_socket_service: proxy connection extablished
[2024/04/30 13:19:33:7846] I: lws_http_client_socket_service: HANDSHAKE2: [wsicli|0|WS/h1/default/localhost]: sending headers (wsistate 0x10000203), w sock 6
[2024/04/30 13:19:33:8846] I: lws_state_transition_steps: INITIALIZED -> OPERATIONAL
[2024/04/30 13:19:35:4028] I: [wsicli|0|WS/h1/default/localhost]: lws_ssl_capable_read_no_ssl: error on reading from skt : 0, errno 0
[2024/04/30 13:19:35:4028] I: lws_http_client_socket_service: closing conn at LWS_CONNMODE...SERVER_REPLY, [wsicli|0|WS/h1/default/localhost], state 0x20b
[2024/04/30 13:19:35:4028] I: reason: read failed
[2024/04/30 13:19:35:4028] E: CLIENT_CONNECTION_ERROR: read failed
[2024/04/30 13:19:35:4028] I: [wsicli|0|WS/h1/default/localhost]: __lws_close_free_wsi: caller: cbail3
[2024/04/30 13:19:35:4029] I: [wsicli|0|WS/h1/default/localhost]: __lws_close_free_wsi: real just_kill_connection: sockfd 6
[2024/04/30 13:19:35:4029] I: [wsicli|0|WS/h1/default/localhost]: __lws_close_free_wsi: cce=1
[2024/04/30 13:19:35:4030] I: rops_destroy_role_h1: ah det due to close
[2024/04/30 13:19:35:4030] I: __lws_header_table_detach: [wsicli|0|WS/h1/default/localhost]: ah 0x55c343ec2240 (tsi=0, count = 1)
[2024/04/30 13:19:35:4030] I: __lws_header_table_detach: nobody usable waiting
[2024/04/30 13:19:35:4030] I: _lws_destroy_ah: freed ah 0x55c343ec2240 : pool length 0
[2024/04/30 13:19:35:4030] I: __lws_header_table_detach: [wsicli|0|WS/h1/default/localhost]: ah 0x55c343ec2240 (tsi=0, count = 0)
[2024/04/30 13:19:35:4030] N: __lws_lc_untag: -- [wsicli|0|WS/h1/default/localhost] (0) 1.619s
[2024/04/30 13:19:35:4030] I: lws_context_destroy: destroy_state 0
[2024/04/30 13:19:35:4030] I: lws_context_destroy: starting context destroy flow
[2024/04/30 13:19:35:4031] I: [vh|1|default||-1]: lws_context_destroy: start close
[2024/04/30 13:19:35:4031] I: [vh|1|default||-1]: lws_vhost_destroy1:
[2024/04/30 13:19:35:4031] I: [wsi|0|pipe]: __lws_close_free_wsi: caller: ctx destroy
[2024/04/30 13:19:35:4031] I: [wsi|0|pipe]: __lws_close_free_wsi: real just_kill_connection: sockfd 4
[2024/04/30 13:19:35:4031] I: [wsi|0|pipe]: __lws_close_free_wsi: cce=0
[2024/04/30 13:19:35:4031] N: __lws_lc_untag: -- [wsi|0|pipe] (0) 1.621s
[2024/04/30 13:19:35:4031] I: [vh|0|netlink]: __lws_close_free_wsi: caller: ctx destroy
[2024/04/30 13:19:35:4031] I: [vh|0|netlink]: __lws_close_free_wsi: real just_kill_connection: sockfd 5
[2024/04/30 13:19:35:4031] I: [vh|0|netlink]: __lws_close_free_wsi: cce=0
[2024/04/30 13:19:35:4032] N: __lws_lc_untag: -- [vh|0|netlink] (1) 1.621s
[2024/04/30 13:19:35:4032] I: lws_context_destroy: manually destroying pts
[2024/04/30 13:19:35:4032] I: lws_context_destroy: PT_WAIT_ALL_DESTROYED: 0 alive
[2024/04/30 13:19:35:4032] N: __lws_lc_untag: -- [vh|1|default||-1] (0) 1.620s
[2024/04/30 13:19:35:4032] I: lws_context_destroy: pt destroy 0
[2024/04/30 13:19:35:4033] I: lws_state_transition_steps: POLICY_INVALID -> DESTROYING
[2024/04/30 13:19:35:4033] I: lws_context_destroy: pt 0 fully destroyed
[2024/04/30 13:19:35:4033] U: Completed 3 failed
The text was updated successfully, but these errors were encountered: