From 387c2087b20150bfd4719d4217326669b389592e Mon Sep 17 00:00:00 2001 From: Denis Chancogne Date: Fri, 30 Jan 2026 23:42:50 +0100 Subject: [PATCH 01/17] Allow to disable SNI. --- Makefile | 2 +- cmdline.c | 14 ++++++++++++-- cmdline.h | 1 + docs/proxytunnel.1.adoc | 3 +++ io.c | 9 +++++---- ptstream.c | 22 ++++++++++++---------- 6 files changed, 34 insertions(+), 17 deletions(-) diff --git a/Makefile b/Makefile index a925a89..f68cde9 100644 --- a/Makefile +++ b/Makefile @@ -17,7 +17,7 @@ OPTFLAGS += -DUSE_SSL # MSYS # The current version of gcc from MSYS defines __MSYS__ and __CYGWIN__. # To avoid to change the code, simply define CYGWIN additionally. -ifneq ($(filter $(MSYSTEM),MSYS MINGW32 MINGW64 UCRT64),) +ifneq ($(filter $(shell uname -o),Msys Cygwin),) CFLAGS += -DCYGWIN else # Most systems, MSYS definitely not diff --git a/cmdline.c b/cmdline.c index 7e5db30..bc89020 100644 --- a/cmdline.c +++ b/cmdline.c @@ -98,6 +98,7 @@ void cmdline_parser_print_help (void) { #ifdef SETPROCTITLE " -x, --proctitle=STRING Use a different process title\n" #endif +" -I, --no-sni Disable SNI\n" "\n" "Miscellaneous options:\n" " -v, --verbose Turn on verbosity\n" @@ -164,6 +165,7 @@ int cmdline_parser( int argc, char * const *argv, struct gengetopt_args_info *ar /* args_info->enforcetls1_given = 0; */ args_info->host_given = 0; args_info->cacert_given = 0; + args_info->no_sni_flag = 0; /* No... we can't make this a function... -- Maniac */ #define clear_args() \ @@ -202,6 +204,7 @@ int cmdline_parser( int argc, char * const *argv, struct gengetopt_args_info *ar args_info->cacert_arg = NULL; \ args_info->enforceipv4_flag = 0; \ args_info->enforceipv6_flag = 0; \ + args_info->no_sni_flag = 0; \ } clear_args(); @@ -250,12 +253,13 @@ int cmdline_parser( int argc, char * const *argv, struct gengetopt_args_info *ar { "cacert", 1, NULL, 'C' }, { "ipv4", 0, NULL, '4' }, { "ipv6", 0, NULL, '6' }, + { "no-sni", 0, NULL, 'I' }, { NULL, 0, NULL, 0 } }; - c = getopt_long (argc, argv, "hVia:u:s:t:F:p:P:r:R:d:H:x:c:k:vNeEXWBqLo:TzC:46", long_options, &option_index); + c = getopt_long (argc, argv, "hVia:u:s:t:F:p:P:r:R:d:H:x:c:k:vNeEXWBqLo:TzC:46I", long_options, &option_index); #else - c = getopt( argc, argv, "hVia:u:s:t:F:p:P:r:R:d:H:x:c:k:vNeEXWBqLo:TzC:46" ); + c = getopt( argc, argv, "hVia:u:s:t:F:p:P:r:R:d:H:x:c:k:vNeEXWBqLo:TzC:46I" ); #endif if (c == -1) @@ -524,6 +528,12 @@ int cmdline_parser( int argc, char * const *argv, struct gengetopt_args_info *ar message("IPv6 enforced\n"); break; + case 'I': /* Disable SNI */ + args_info->no_sni_flag = 1; + if( args_info->verbose_flag ) + message("Disable SNI\n"); + break; + case 0: /* Long option with no short option */ case '?': /* Invalid option. */ diff --git a/cmdline.h b/cmdline.h index 93cf460..1ad3eb1 100644 --- a/cmdline.h +++ b/cmdline.h @@ -93,6 +93,7 @@ struct gengetopt_args_info { /* int enforcetls1_given; Wheter to enforce TLSv1 */ int host_given; /* Wheter we override the Host Header */ int cacert_given; /* Whether cacert was given */ + int no_sni_flag; /* Disable SNI */ }; int cmdline_parser( int argc, char * const *argv, struct gengetopt_args_info *args_info ); diff --git a/docs/proxytunnel.1.adoc b/docs/proxytunnel.1.adoc index 0e8e6b5..169987f 100644 --- a/docs/proxytunnel.1.adoc +++ b/docs/proxytunnel.1.adoc @@ -135,6 +135,9 @@ also be used for other proxy-traversing purposes like proxy bouncing. *-x*, *--proctitle*=_STRING_:: Use a different process title. +*-I*, *--no-sni*:: + Disable SNI. + == MISCELLANEOUS OPTIONS diff --git a/io.c b/io.c index 56d516e..49e76d2 100644 --- a/io.c +++ b/io.c @@ -57,10 +57,11 @@ int readline(PTSTREAM *pts) { if( args_info.verbose_flag ) { /* Copy line of data into dstr without trailing newline */ - char *dstr = calloc(1, strlen(buf) + 1); - strncpy( dstr, buf, strlen(buf)); - if (strcmp(dstr, "")) - message( " <- %s\n", dstr ); + int len = strlen(buf); + buf[len - 2] = 0; + if (strcmp(buf, "")) + message( " <- %s\n", buf ); + buf[len - 2] = '\r'; } return strlen( buf ); } diff --git a/ptstream.c b/ptstream.c index d7c6424..a43498f 100644 --- a/ptstream.c +++ b/ptstream.c @@ -340,17 +340,19 @@ int stream_enable_ssl(PTSTREAM *pts, const char *proxy_arg) { goto fail; } - /* SNI support */ - if ( args_info.verbose_flag ) { - message( "Set SNI hostname to %s\n", peer_host); + if(!args_info.no_sni_flag) { + /* SNI support */ + if ( args_info.verbose_flag ) { + message( "Set SNI hostname to %s\n", peer_host); + } + res = SSL_set_tlsext_host_name(ssl, peer_host); + if ( res != 1 ) { + message( "SSL_set_tlsext_host_name() failed for host name '%s'. " + "TLS SNI error, giving up\n", peer_host); + goto fail; + } } - res = SSL_set_tlsext_host_name(ssl, peer_host); - if ( res != 1 ) { - message( "SSL_set_tlsext_host_name() failed for host name '%s'. " - "TLS SNI error, giving up\n", peer_host); - goto fail; - } - + if ( SSL_connect (ssl) <= 0) { message( "SSL_connect failed\n"); goto fail; From b66f2fa205bfa7d86fcf2401f07ea8a8976417f7 Mon Sep 17 00:00:00 2001 From: Denis Chancogne Date: Sat, 31 Jan 2026 00:01:59 +0100 Subject: [PATCH 02/17] Update README.md with no-sni option. --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index dc5836d..3227aa3 100644 --- a/README.md +++ b/README.md @@ -60,6 +60,7 @@ Additional options for specific features: -H, --header=STRING Add additional HTTP headers to send to proxy -o, --host=STRING Send custom Host Header/SNI -x, --proctitle=STRING Use a different process title + -I, --no-sni Disable SNI Miscellaneous options: -v, --verbose Turn on verbosity From 3ccb37473a87bceaf7d5aea1a7241e98a227aa17 Mon Sep 17 00:00:00 2001 From: Denis Chancogne Date: Mon, 2 Feb 2026 01:02:13 +0100 Subject: [PATCH 03/17] Host header same as CONNECT arg. --- http.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/http.c b/http.c index 12e1956..51808c3 100644 --- a/http.c +++ b/http.c @@ -108,7 +108,7 @@ void proxy_protocol(PTSTREAM *pts) { } else { if( args_info.verbose_flag ) message( "\nTunneling to %s (destination)\n", args_info.dest_arg ); - sprintf( buf, "CONNECT %s HTTP/1.1\r\nHost: %s\r\n", args_info.dest_arg, args_info.host_arg ? args_info.host_arg : args_info.proxyhost_arg ); + sprintf( buf, "CONNECT %s HTTP/1.1\r\nHost: %s\r\n", args_info.dest_arg, args_info.host_arg ? args_info.host_arg : args_info.dest_arg ); } if ( args_info.user_given && args_info.pass_given ) { From cac77b55a2d8b3479c82dc8052a644acedc356c9 Mon Sep 17 00:00:00 2001 From: Denis Chancogne Date: Fri, 17 Apr 2026 14:20:34 +0200 Subject: [PATCH 04/17] Add setproctitle and update INSTALL.md for Cygwin. --- .github/workflows/cygwin.yml | 13 +++++++++++++ INSTALL.md | 25 +++++++++++++++---------- Makefile | 17 +++++++---------- proxytunnel.c | 16 ++++++++++------ proxytunnel.h | 4 ++++ setproctitle.c | 4 ++++ 6 files changed, 53 insertions(+), 26 deletions(-) create mode 100644 .github/workflows/cygwin.yml diff --git a/.github/workflows/cygwin.yml b/.github/workflows/cygwin.yml new file mode 100644 index 0000000..4773adc --- /dev/null +++ b/.github/workflows/cygwin.yml @@ -0,0 +1,13 @@ +name: Build for Windows (Cygwin) + +on: + workflow_dispatch: + +jobs: + build: + runs-on: windows-latest + steps: + - uses: actions/checkout@v6.0.2 + - uses: cygwin/cygwin-install-action@v6.1 + - name: Build + run: make && make docs diff --git a/INSTALL.md b/INSTALL.md index a7db3fe..fea3c28 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -1,7 +1,7 @@ # Short guide to installing proxytunnel On most modern **unix systems**, use the normal Makefile, possibly uncommenting -the section related to your system (darwin/cygwin/solaris/openbsd) +the section related to your system (darwin/solaris/openbsd) If you want to enable setproctitle functionality, add a CFLAGS define -DSETPROCTITLE (uncomment sample in Makefile) @@ -94,15 +94,20 @@ me@mymachine MSYS ~ cp /usr/bin/msys-2.0.dll /usr/bin/msys-crypto-1.1.dll /usr/ # Cygwin : -Currently cygwin's openssl isn't in a compilable state, change md4.h and -md5.h in /usr/include -and replace 'size_t' with 'unsigned long' +Install from [cygwin web site](https://cygwin.com). -To link the final executable: -gcc -o proxytunnel *.o /lib/libcrypto.dll.a /lib/libssl.dll.a +Following packages are required : +``` +$ setup-x86_64.exe -n -q -P gcc-core,make,libssl-devel,zip,xmlto,asciidoc +``` -To run, copy the required dll's from the cygwin-bin dir to the windows -system dir, or the proxytunnel directory (cygcrypto-0.9.8.dll, -cygssl-0.9.8.dll, cygwin1.dll ) +To build : +``` +$ make +$ make docs +``` -Setproctitle doesn't work on cygwin (afaik) +To use `proxytunnel.exe` from windows, copy cygwin and openssl dll to the same directory as proxytunnel.exe (use `ldd` cmd to see what dll are used by `proxytunnel.exe`) cmd: +``` +$ cp $(ldd proxytunnel.exe | awk '{print $3}' | grep -v WINDOWS | sort | uniq) . +``` diff --git a/Makefile b/Makefile index f68cde9..c24e75d 100644 --- a/Makefile +++ b/Makefile @@ -14,16 +14,16 @@ OPTFLAGS += -DHAVE_GETOPT_LONG # Comment if you don't have/want ssl OPTFLAGS += -DUSE_SSL -# MSYS -# The current version of gcc from MSYS defines __MSYS__ and __CYGWIN__. -# To avoid to change the code, simply define CYGWIN additionally. +# MSYS/CYGWIN +# The current version of gcc from MSYS defines __MSYS__ and __CYGWIN__, from CYGWIN defines __CYGWIN__. +# To avoid to change the code, simply define CYGWIN additionally. ifneq ($(filter $(shell uname -o),Msys Cygwin),) -CFLAGS += -DCYGWIN -else -# Most systems, MSYS definitely not -OPTFLAGS += -DSETPROCTITLE -DSPT_TYPE=2 +OPTFLAGS += -DCYGWIN endif +# Most systems +OPTFLAGS += -DSETPROCTITLE -DSPT_TYPE=2 + # System dependant blocks... if your system is listed below, uncomment # the relevant lines @@ -39,9 +39,6 @@ endif #OPTFLAGS += -DDEFAULT_CA_FILE='"/usr/local/etc/openssl@1.1/cacert.pem"' #OPTFLAGS += -DDEFAULT_CA_DIR=NULL -# CYGWIN -#OPTFLAGS += -DCYGWIN - # SOLARIS #LDFLAGS += -lsocket -lnsl #LDFLAGS += -L/usr/local/ssl/lib # Path to your SSL lib dir diff --git a/proxytunnel.c b/proxytunnel.c index 4b57b0b..8d1eae6 100644 --- a/proxytunnel.c +++ b/proxytunnel.c @@ -284,9 +284,9 @@ void do_daemon() #ifdef SETPROCTITLE if( ! args_info.proctitle_given ) - setproctitle( "[daemon]\0" ); + setproctitle( "[daemon]" ); else - setproctitle( "\0" ); + setproctitle( "" ); #else if( args_info.proctitle_given ) message( "Setting process-title is not supported in this build\n"); @@ -374,9 +374,9 @@ void do_daemon() #ifdef SETPROCTITLE if( ! args_info.proctitle_given ) - setproctitle( "[cpio]\0" ); + setproctitle( "[cpio]" ); else - setproctitle( "\0" ); + setproctitle( "" ); #else if( args_info.proctitle_given ) message( "Setting process-title is not supported in this build\n"); @@ -406,7 +406,11 @@ int main( int argc, char *argv[] ) { cmdline_parser( argc, argv, &args_info ); #ifdef SETPROCTITLE +#ifndef CYGWIN initsetproctitle( argc, argv ); +#else + initsetproctitlecygwin( argc, argv ); +#endif #endif /* @@ -499,9 +503,9 @@ int main( int argc, char *argv[] ) { #ifdef SETPROCTITLE if( ! args_info.proctitle_given ) - setproctitle( "[cpio]\0" ); + setproctitle( "[cpio]" ); else - setproctitle( "\0" ); + setproctitle( "" ); #else if( args_info.proctitle_given ) message( "Setting process-title is not supported in this build\n"); diff --git a/proxytunnel.h b/proxytunnel.h index 88a5471..3aea944 100644 --- a/proxytunnel.h +++ b/proxytunnel.h @@ -31,7 +31,11 @@ void proxy_protocol(PTSTREAM *pts); void closeall(); void do_daemon(); #ifdef SETPROCTITLE +#ifndef CYGWIN void initsetproctitle(int argc, char *argv[]); +#else +void initsetproctitlecygwin(int argc, char *argv[]); +#endif void setproctitle(const char *fmt, ...); #endif diff --git a/setproctitle.c b/setproctitle.c index 32ac246..4142ef6 100644 --- a/setproctitle.c +++ b/setproctitle.c @@ -67,7 +67,11 @@ static size_t argv_env_len = 0; #endif /* HAVE_SETPROCTITLE */ +#ifndef CYGWIN void initsetproctitle(int argc, char *argv[]) { +#else +void initsetproctitlecygwin(int argc, char *argv[]) { +#endif #if defined(SPT_TYPE) && SPT_TYPE == SPT_REUSEARGV extern char **environ; char *lastargv = NULL; From c9148a83e5cd9b05952d4abef5f149e688a6c7ed Mon Sep 17 00:00:00 2001 From: Denis Chancogne Date: Fri, 17 Apr 2026 14:54:54 +0200 Subject: [PATCH 05/17] Add package cygwin-devel to cygwin workflow. --- .github/workflows/cygwin.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/cygwin.yml b/.github/workflows/cygwin.yml index 4773adc..ba25c97 100644 --- a/.github/workflows/cygwin.yml +++ b/.github/workflows/cygwin.yml @@ -9,5 +9,7 @@ jobs: steps: - uses: actions/checkout@v6.0.2 - uses: cygwin/cygwin-install-action@v6.1 + with: + packages: cygwin-devel - name: Build run: make && make docs From 10a302fb4061a6019b7284c83e8343546b1861cf Mon Sep 17 00:00:00 2001 From: Denis Chancogne Date: Fri, 17 Apr 2026 15:17:49 +0200 Subject: [PATCH 06/17] Test cygwin workflow. --- .github/workflows/cygwin.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/cygwin.yml b/.github/workflows/cygwin.yml index ba25c97..8521c1c 100644 --- a/.github/workflows/cygwin.yml +++ b/.github/workflows/cygwin.yml @@ -11,5 +11,9 @@ jobs: - uses: cygwin/cygwin-install-action@v6.1 with: packages: cygwin-devel + - name: test + run: ls /usr/include + - name: test2 + run: ls /usr/include/netinet - name: Build run: make && make docs From 6ab785f7e3d1594fe7cb8947d07d4f1415bc00b7 Mon Sep 17 00:00:00 2001 From: Denis Chancogne Date: Fri, 17 Apr 2026 15:23:22 +0200 Subject: [PATCH 07/17] Test cygwin workflow #2. --- .github/workflows/cygwin.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/cygwin.yml b/.github/workflows/cygwin.yml index 8521c1c..111311d 100644 --- a/.github/workflows/cygwin.yml +++ b/.github/workflows/cygwin.yml @@ -9,11 +9,9 @@ jobs: steps: - uses: actions/checkout@v6.0.2 - uses: cygwin/cygwin-install-action@v6.1 - with: - packages: cygwin-devel - name: test - run: ls /usr/include + run: bash "ls /usr/include" - name: test2 - run: ls /usr/include/netinet + run: bash "ls /usr/include/netinet" - name: Build - run: make && make docs + run: bash "make && make docs" From cf09f4d869c22cbee1b0c59bfb1ed77dd9d0928d Mon Sep 17 00:00:00 2001 From: Denis Chancogne Date: Fri, 17 Apr 2026 15:32:01 +0200 Subject: [PATCH 08/17] Test cygwin workflow #3. --- .github/workflows/cygwin.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cygwin.yml b/.github/workflows/cygwin.yml index 111311d..2b5b00e 100644 --- a/.github/workflows/cygwin.yml +++ b/.github/workflows/cygwin.yml @@ -10,8 +10,11 @@ jobs: - uses: actions/checkout@v6.0.2 - uses: cygwin/cygwin-install-action@v6.1 - name: test - run: bash "ls /usr/include" + shell: bash {0} + run: ls /usr/include - name: test2 - run: bash "ls /usr/include/netinet" + shell: bash {0} + run: ls /usr/include/netinet - name: Build - run: bash "make && make docs" + shell: bash {0} + run: make && make docs From 5ed6b9abd17de5c10f7dc296ff241f85e53f5e83 Mon Sep 17 00:00:00 2001 From: Denis Chancogne Date: Fri, 17 Apr 2026 15:35:35 +0200 Subject: [PATCH 09/17] Test cygwin workflow #3. --- .github/workflows/cygwin.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/cygwin.yml b/.github/workflows/cygwin.yml index 2b5b00e..200d272 100644 --- a/.github/workflows/cygwin.yml +++ b/.github/workflows/cygwin.yml @@ -9,6 +9,8 @@ jobs: steps: - uses: actions/checkout@v6.0.2 - uses: cygwin/cygwin-install-action@v6.1 + with: + packages: cygwin-devel - name: test shell: bash {0} run: ls /usr/include From 029355563b9a73af4be19e0c246c9b80ae1f265e Mon Sep 17 00:00:00 2001 From: Denis Chancogne Date: Fri, 17 Apr 2026 15:51:20 +0200 Subject: [PATCH 10/17] Test cygwin workflow #5. --- .github/workflows/cygwin.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/cygwin.yml b/.github/workflows/cygwin.yml index 200d272..063577e 100644 --- a/.github/workflows/cygwin.yml +++ b/.github/workflows/cygwin.yml @@ -13,10 +13,7 @@ jobs: packages: cygwin-devel - name: test shell: bash {0} - run: ls /usr/include - - name: test2 - shell: bash {0} - run: ls /usr/include/netinet + run: gcc --version && cc --version - name: Build shell: bash {0} run: make && make docs From 3cbc3b6384f0dddbe0d4678e1ba7fcae67c49e5b Mon Sep 17 00:00:00 2001 From: Denis Chancogne Date: Fri, 17 Apr 2026 15:56:54 +0200 Subject: [PATCH 11/17] Test cygwin workflow #6. --- .github/workflows/cygwin.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cygwin.yml b/.github/workflows/cygwin.yml index 063577e..4976c80 100644 --- a/.github/workflows/cygwin.yml +++ b/.github/workflows/cygwin.yml @@ -10,10 +10,10 @@ jobs: - uses: actions/checkout@v6.0.2 - uses: cygwin/cygwin-install-action@v6.1 with: - packages: cygwin-devel + packages: gcc-core - name: test shell: bash {0} - run: gcc --version && cc --version + run: gcc --version && cc --version && make --version && ld --version - name: Build shell: bash {0} run: make && make docs From 9ae353d2b154bd01f2840903d5eed15bc478adb4 Mon Sep 17 00:00:00 2001 From: Denis Chancogne Date: Fri, 17 Apr 2026 16:00:46 +0200 Subject: [PATCH 12/17] Test cygwin workflow #7. --- .github/workflows/cygwin.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cygwin.yml b/.github/workflows/cygwin.yml index 4976c80..952d161 100644 --- a/.github/workflows/cygwin.yml +++ b/.github/workflows/cygwin.yml @@ -10,7 +10,7 @@ jobs: - uses: actions/checkout@v6.0.2 - uses: cygwin/cygwin-install-action@v6.1 with: - packages: gcc-core + packages: gcc-core make binutils - name: test shell: bash {0} run: gcc --version && cc --version && make --version && ld --version From e7d2f2c5566a081892e0a2b0a104b8b2e79ad124 Mon Sep 17 00:00:00 2001 From: Denis Chancogne Date: Fri, 17 Apr 2026 16:06:43 +0200 Subject: [PATCH 13/17] Test cygwin workflow #8. --- .github/workflows/cygwin.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/cygwin.yml b/.github/workflows/cygwin.yml index 952d161..9026472 100644 --- a/.github/workflows/cygwin.yml +++ b/.github/workflows/cygwin.yml @@ -10,10 +10,7 @@ jobs: - uses: actions/checkout@v6.0.2 - uses: cygwin/cygwin-install-action@v6.1 with: - packages: gcc-core make binutils - - name: test - shell: bash {0} - run: gcc --version && cc --version && make --version && ld --version + packages: gcc-core make binutils libssl-devel xmlto asciidoc - name: Build shell: bash {0} run: make && make docs From 643a8fc493e7ef028315a56c1fbb1c90136575a7 Mon Sep 17 00:00:00 2001 From: Denis Chancogne Date: Fri, 17 Apr 2026 16:27:00 +0200 Subject: [PATCH 14/17] INSTALL.md update for Cygwin OK. --- .github/workflows/cygwin.yml | 3 +++ INSTALL.md | 4 ++-- docs/Makefile | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cygwin.yml b/.github/workflows/cygwin.yml index 9026472..7bd766a 100644 --- a/.github/workflows/cygwin.yml +++ b/.github/workflows/cygwin.yml @@ -14,3 +14,6 @@ jobs: - name: Build shell: bash {0} run: make && make docs + - name: Check + shell: bash {0} + run: ldd proxytunnel.exe | awk '{print $3}' | grep -v WINDOWS | sort | uniq diff --git a/INSTALL.md b/INSTALL.md index fea3c28..b052052 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -94,11 +94,11 @@ me@mymachine MSYS ~ cp /usr/bin/msys-2.0.dll /usr/bin/msys-crypto-1.1.dll /usr/ # Cygwin : -Install from [cygwin web site](https://cygwin.com). +Install Cygwin from [cygwin web site](https://cygwin.com). Following packages are required : ``` -$ setup-x86_64.exe -n -q -P gcc-core,make,libssl-devel,zip,xmlto,asciidoc +$ setup-x86_64.exe -n -q -P gcc-core,make,binutils,libssl-devel,xmlto,asciidoc ``` To build : diff --git a/docs/Makefile b/docs/Makefile index 8e71490..5bcd755 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -21,7 +21,7 @@ clean: asciidoc -d manpage -arevnumber=$(version) -arevdate=$(version_date) $< %.1: %.1.xml - xmlto man $< + xmlto --skip-validation man $< %.html: %.adoc asciidoc $< From ee2fbcd41e39847ea23f50c52d4bf71967008795 Mon Sep 17 00:00:00 2001 From: Denis Chancogne Date: Fri, 17 Apr 2026 16:42:50 +0200 Subject: [PATCH 15/17] Cygwin: WINDOWS can be Windows instead. --- .github/workflows/cygwin.yml | 2 +- INSTALL.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cygwin.yml b/.github/workflows/cygwin.yml index 7bd766a..87e767f 100644 --- a/.github/workflows/cygwin.yml +++ b/.github/workflows/cygwin.yml @@ -16,4 +16,4 @@ jobs: run: make && make docs - name: Check shell: bash {0} - run: ldd proxytunnel.exe | awk '{print $3}' | grep -v WINDOWS | sort | uniq + run: ldd proxytunnel.exe | awk '{print $3}' | grep -vi windows/system32 | sort | uniq diff --git a/INSTALL.md b/INSTALL.md index b052052..d61f59c 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -109,5 +109,5 @@ $ make docs To use `proxytunnel.exe` from windows, copy cygwin and openssl dll to the same directory as proxytunnel.exe (use `ldd` cmd to see what dll are used by `proxytunnel.exe`) cmd: ``` -$ cp $(ldd proxytunnel.exe | awk '{print $3}' | grep -v WINDOWS | sort | uniq) . +$ cp $(ldd proxytunnel.exe | awk '{print $3}' | grep -vi windows/system32 | sort | uniq) . ``` From 9a1f9bfbd332c707223afc37fbba5707b3592eb4 Mon Sep 17 00:00:00 2001 From: Denis Chancogne Date: Fri, 17 Apr 2026 17:19:32 +0200 Subject: [PATCH 16/17] Cygwin: add docbook-xml45 package for xmlto validation. --- .github/workflows/cygwin.yml | 2 +- INSTALL.md | 2 +- docs/Makefile | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cygwin.yml b/.github/workflows/cygwin.yml index 87e767f..fa4e2a0 100644 --- a/.github/workflows/cygwin.yml +++ b/.github/workflows/cygwin.yml @@ -10,7 +10,7 @@ jobs: - uses: actions/checkout@v6.0.2 - uses: cygwin/cygwin-install-action@v6.1 with: - packages: gcc-core make binutils libssl-devel xmlto asciidoc + packages: gcc-core make binutils libssl-devel xmlto asciidoc docbook-xml45 - name: Build shell: bash {0} run: make && make docs diff --git a/INSTALL.md b/INSTALL.md index d61f59c..b91643d 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -98,7 +98,7 @@ Install Cygwin from [cygwin web site](https://cygwin.com). Following packages are required : ``` -$ setup-x86_64.exe -n -q -P gcc-core,make,binutils,libssl-devel,xmlto,asciidoc +$ setup-x86_64.exe -n -q -P gcc-core,make,binutils,libssl-devel,xmlto,asciidoc,docbook-xml45 ``` To build : diff --git a/docs/Makefile b/docs/Makefile index 5bcd755..8e71490 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -21,7 +21,7 @@ clean: asciidoc -d manpage -arevnumber=$(version) -arevdate=$(version_date) $< %.1: %.1.xml - xmlto --skip-validation man $< + xmlto man $< %.html: %.adoc asciidoc $< From 1411a234bf5a62c442dcc2c350397fbbc1e9a68a Mon Sep 17 00:00:00 2001 From: Denis Chancogne Date: Mon, 20 Apr 2026 00:32:13 +0200 Subject: [PATCH 17/17] No setproctitle() on Msys. --- Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index c24e75d..d38b82e 100644 --- a/Makefile +++ b/Makefile @@ -21,8 +21,10 @@ ifneq ($(filter $(shell uname -o),Msys Cygwin),) OPTFLAGS += -DCYGWIN endif -# Most systems +ifeq ($(filter $(shell uname -o),Msys),) +# Most systems, MSYS definitely not OPTFLAGS += -DSETPROCTITLE -DSPT_TYPE=2 +endif # System dependant blocks... if your system is listed below, uncomment # the relevant lines