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

最新的naive静态版不能在梅林上使用 #521

Closed
ghost opened this issue Jun 4, 2023 · 6 comments
Closed

最新的naive静态版不能在梅林上使用 #521

ghost opened this issue Jun 4, 2023 · 6 comments

Comments

@ghost
Copy link

ghost commented Jun 4, 2023

显示错误
close symbol missing
Trace/breakpoint trap

@ghost
Copy link
Author

ghost commented Jun 4, 2023

好像在代码

using LibcCloseFuncPtr = int (*)(int);

引入了dlsym

注释掉代码,重新编译静态版可以正常使用

/*
using LibcCloseFuncPtr = int (*)(int);

// Load the libc close symbol to forward to from the close wrapper.
LibcCloseFuncPtr LoadCloseSymbol() {
#if defined(THREAD_SANITIZER)
  // If TSAN is enabled use __interceptor___close first to make sure the TSAN
  // wrapper gets called.
  return reinterpret_cast<LibcCloseFuncPtr>(
      dlsym(RTLD_DEFAULT, "__interceptor___close"));
#else
  return reinterpret_cast<LibcCloseFuncPtr>(dlsym(RTLD_NEXT, "close"));
#endif
}

extern "C" {

NO_SANITIZE("cfi-icall")
__attribute__((visibility("default"), noinline)) int close(int fd) {
  static LibcCloseFuncPtr libc_close = LoadCloseSymbol();
  if (base::IsFDOwned(fd) && g_is_ownership_enforced)
    CrashOnFdOwnershipViolation();
  if (libc_close == nullptr) {
    RAW_LOG(ERROR, "close symbol missing\n");
    base::ImmediateCrash();
  }
  return libc_close(fd);
}

}  // extern "C"
*/

@klzgrad
Copy link
Owner

klzgrad commented Jun 4, 2023

@ghost
Copy link
Author

ghost commented Jun 4, 2023

可以了

@ghost ghost closed this as completed Jun 4, 2023
@zhangbo8418
Copy link

https://github.com/klzgrad/naiveproxy/releases/tag/v114.0.5735.91-3

----- Certificate i=0 (CN=xxxxxx.com) -----
ERROR: No matching issuer found

[0604/154826.154703:ERROR:ssl_client_socket_impl.cc(978)] handshake failed; returned -1, SSL error code 1, net_error -202
[0604/154826.157327:INFO:naive_proxy.cc(193)] Connection 1 closed: ERR_PROXY_CERTIFICATE_INVALID
[0604/154826.181525:INFO:naive_connection.cc(273)] Connection 2 to www.youtube.com:443
[0604/154826.656058:ERROR:ssl_client_socket_impl.cc(978)] handshake failed; returned -1, SSL error code 1, net_error -202
[0604/154826.657238:INFO:naive_proxy.cc(193)] Connection 2 closed: ERR_PROXY_CERTIFICATE_INVALID
[0604/154829.681467:INFO:naive_connection.cc(273)] Connection 3 to www.youtube.com:443
[0604/154830.173016:ERROR:ssl_client_socket_impl.cc(978)] handshake failed; returned -1, SSL error code 1, net_error -202
[0604/154830.174194:INFO:naive_proxy.cc(193)] Connection 3 closed: ERR_PROXY_CERTIFICATE_INVALID
[0604/154830.197000:INFO:naive_connection.cc(273)] Connection 4 to www.youtube.com:443
[0604/154830.657323:ERROR:ssl_client_socket_impl.cc(978)] handshake failed; returned -1, SSL error code 1, net_error -202
[0604/154830.658496:INFO:naive_proxy.cc(193)] Connection 4 closed: ERR_PROXY_CERTIFICATE_INVALID

@zhangbo8418
Copy link

https://github.com/klzgrad/naiveproxy/releases/tag/v114.0.5735.91-3

我那错误是啥意思?不支持Let's Encrypt的证书?

@ghost
Copy link
Author

ghost commented Jun 5, 2023

支持的,我这没问题,可能这个补丁有影响c53143b
具体的我不清楚,你自己开个issue问下

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants