Compare commits

...

14 Commits

Author SHA1 Message Date
Vladimir Dubrovin
8fcc358e43 Update c-cpp.yml
Some checks failed
C/C++ CI / ${{ matrix.target }} (macos-15) (push) Has been cancelled
C/C++ CI / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Has been cancelled
C/C++ CI / ${{ matrix.target }} (ubuntu-latest) (push) Has been cancelled
C/C++ CI / ${{ matrix.target }} (windows-2022) (push) Has been cancelled
2025-08-10 15:47:41 +03:00
Vladimir Dubrovin
352b570413 Update c-cpp.yml 2025-08-10 15:45:49 +03:00
Vladimir Dubrovin
6d93ffec5d Update c-cpp.yml 2025-08-10 15:44:55 +03:00
Vladimir Dubrovin
613f51599b Update c-cpp.yml 2025-08-10 15:43:45 +03:00
Vladimir Dubrovin
24967c9e2b Update c-cpp.yml 2025-08-10 15:42:11 +03:00
Vladimir Dubrovin
a281c05259 Update c-cpp.yml 2025-08-10 15:39:16 +03:00
Vladimir Dubrovin
cc06d305d5 Update c-cpp.yml 2025-08-10 15:34:57 +03:00
Vladimir Dubrovin
012987eb1c Update c-cpp.yml 2025-08-10 15:29:58 +03:00
Vladimir Dubrovin
4eefe0ccff Update c-cpp.yml 2025-08-10 15:14:12 +03:00
Vladimir Dubrovin
b1233e580c Merge branch 'master' of https://github.com/3proxy/3proxy 2025-08-10 15:12:46 +03:00
Vladimir Dubrovin
52cf4af0ac Update c-cpp.yml 2025-08-10 15:12:41 +03:00
Sertonix
d0ccaa07c3
Fix race condition in make install on linux (#1129)
Since INSTALL_CFG_DEST is a symlink we also need to make sure that the target always exists before installing anything to it.

Fixes f860ea9e54 Install chrooted configuration with make install on linux
2025-08-10 14:46:48 +03:00
bipface
83e4f181b3
Fix missing semicolons in debian postinst script (#1158)
These missing semicolons cause some errors to be printed during installation, such as: `Failed to stop bin-systemctl.mount: Unit bin-systemctl.mount not loaded.`
2025-08-10 14:39:49 +03:00
Vladimir Dubrovin
724946a834 Fixed: ssl_server_cert doesn't read full certificate chain 2025-08-10 14:36:00 +03:00
4 changed files with 17 additions and 18 deletions

View File

@ -37,7 +37,7 @@ jobs:
run: cmd /C 'echo LIBS := -L "c:/program files/openssl/lib" $(LIBS) >>Makefile.win && echo CFLAGS := -I "c:/program files/openssl/include" $(CFLAGS) >>Makefile.win && type Makefile.win'
- name: SSLPlugin Linux
if: ${{ startsWith(matrix.target, 'ubuntu') }}
run: 'echo PLUGINS := $(PLUGINS) SSLPlugin >>Makefile & echo LIBS := $(LIBS) -lcrypto -lssl >>Makefile'
run: "sed -i '/^PLUGIN/s/$/ SSLPlugin/' Makefile && sed -i '/^LIBS/s/$/ -lcrypto -lssl/' Makefile"
- name: make
run: make
- name: mkdir

View File

@ -103,7 +103,7 @@ install-chroot-dir:
$(INSTALL_BIN) -d $(CHROOTDIR)/libexec
chmod -R o-rwx $(CHROOTDIR)
install-etc-default-config:
install-etc-default-config: install-chroot-dir
if [ ! -d $(INSTALL_CFG_DEST) ]; then \
ln -s $(CHROOTREL)/conf $(INSTALL_CFG_DEST); \
$(INSTALL_BIN) $(INSTALL_CFG) $(ETCDIR)/3proxy.cfg; \

4
debian/postinst vendored
View File

@ -19,8 +19,8 @@ fi
echo ""
echo 3proxy installed.
if /bin/systemctl >/dev/null 2>&1; then \
/bin/systemctl stop 3proxy.service \
/bin/systemctl start 3proxy.service \
/bin/systemctl stop 3proxy.service ;\
/bin/systemctl start 3proxy.service ;\
echo use ;\
echo " "systemctl start 3proxy.service ;\
echo to start proxy ;\

View File

@ -361,11 +361,13 @@ SSL_CTX * ssl_cli_ctx(SSL_CONFIG *config, X509 *server_cert, EVP_PKEY *server_ke
return NULL;
}
err = SSL_CTX_use_certificate(ctx, (X509 *) server_cert);
if ( err <= 0 ) {
*errSSL = getSSLErr();
SSL_CTX_free(ctx);
return NULL;
if(server_cert) {
err = SSL_CTX_use_certificate(ctx, (X509 *) server_cert);
if ( err <= 0 ) {
*errSSL = getSSLErr();
SSL_CTX_free(ctx);
return NULL;
}
}
err = SSL_CTX_use_PrivateKey(ctx, server_key);
@ -379,8 +381,6 @@ SSL_CTX * ssl_cli_ctx(SSL_CONFIG *config, X509 *server_cert, EVP_PKEY *server_ke
if(config->server_cipher_list)SSL_CTX_set_cipher_list(ctx, config->server_cipher_list);
if(config->server_ciphersuites)SSL_CTX_set_ciphersuites(ctx, config->server_ciphersuites);
if(config->server_verify){
fprintf(stderr, "server verify\n");
fflush(stderr);
if(config->server_ca_file || config->server_ca_dir){
SSL_CTX_load_verify_locations(ctx, config->server_ca_file, config->server_ca_dir);
}
@ -483,18 +483,17 @@ static void* ssl_filter_open(void * idata, struct srvparam * srv){
}
if(serv){
if(!srvcert || !srvkey) return sc;
sc->server_cert = getCert(srvcert);
if(!sc->server_cert){
fprintf(stderr, "failed to read: %s\n", srvcert);
return sc;
}
if(!sc->server_key){
return sc;
}
if(!(sc->cli_ctx = ssl_cli_ctx(sc, sc->server_cert, sc->server_key, &errSSL))){
if(!(sc->cli_ctx = ssl_cli_ctx(sc, NULL, sc->server_key, &errSSL))){
fprintf(stderr, "failed to create context: %s\n", errSSL);
return sc;
}
if(SSL_CTX_use_certificate_chain_file(sc->cli_ctx, srvcert) != 1){
fprintf(stderr, "failed to read server cert: %s\n", srvcert);
return sc;
}
sc->serv = 1;
}
if(mitm || cli || serv){
@ -534,7 +533,7 @@ static void* ssl_filter_open(void * idata, struct srvparam * srv){
#endif
else
SSL_CTX_set_default_verify_paths(sc->srv_ctx);
SSL_CTX_set_verify(sc->srv_ctx, SSL_VERIFY_PEER|SSL_VERIFY_FAIL_IF_NO_PEER_CERT, NULL);
SSL_CTX_set_verify(sc->srv_ctx, SSL_VERIFY_PEER|SSL_VERIFY_FAIL_IF_NO_PEER_CERT, NULL);
}
}
#ifdef WIWHSPLICE