From 971c70e6031f3fcfd043c59a75ed886b1b1df905 Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Sat, 30 Oct 2021 11:02:28 +0100 Subject: [PATCH] Move proxy-related source files into a subdirectory. There are quite a few of them already, and I'm about to make another one, so let's start with a bit of tidying up. The CMake build organisation is unchanged: I haven't put the proxy object files into a separate library, just moved the locations of the source files. (Organising proxying as a library would be tricky anyway, because of the various overrides for tools that want to avoid cryptography.) --- CMakeLists.txt | 8 ++++---- cproxy.c => proxy/cproxy.c | 0 nocproxy.c => proxy/nocproxy.c | 0 noproxy.c => proxy/noproxy.c | 0 nosshproxy.c => proxy/nosshproxy.c | 0 pproxy.c => proxy/pproxy.c | 0 proxy.c => proxy/proxy.c | 0 proxy.h => proxy/proxy.h | 0 sshproxy.c => proxy/sshproxy.c | 0 unix/CMakeLists.txt | 10 +++++----- unix/local-proxy.c | 2 +- unix/sharing.c | 2 +- windows/CMakeLists.txt | 6 +++--- windows/local-proxy.c | 2 +- windows/named-pipe-client.c | 2 +- windows/named-pipe-server.c | 2 +- windows/sharing.c | 2 +- 17 files changed, 18 insertions(+), 18 deletions(-) rename cproxy.c => proxy/cproxy.c (100%) rename nocproxy.c => proxy/nocproxy.c (100%) rename noproxy.c => proxy/noproxy.c (100%) rename nosshproxy.c => proxy/nosshproxy.c (100%) rename pproxy.c => proxy/pproxy.c (100%) rename proxy.c => proxy/proxy.c (100%) rename proxy.h => proxy/proxy.h (100%) rename sshproxy.c => proxy/sshproxy.c (100%) diff --git a/CMakeLists.txt b/CMakeLists.txt index 16a0bc96..15670d69 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -29,11 +29,11 @@ add_library(settings STATIC cmdline.c settings.c) add_library(crypto STATIC - cproxy.c sshproxy.c) + proxy/cproxy.c proxy/sshproxy.c) add_subdirectory(crypto) add_library(network STATIC - be_misc.c nullplug.c errsock.c proxy.c logging.c x11disp.c) + be_misc.c nullplug.c errsock.c proxy/proxy.c logging.c x11disp.c) add_library(keygen STATIC import.c) @@ -119,8 +119,8 @@ add_executable(psocks ${platform}/psocks.c psocks.c norand.c - nocproxy.c - nosshproxy.c + proxy/nocproxy.c + proxy/nosshproxy.c ssh/portfwd.c) target_link_libraries(psocks eventloop console network utils diff --git a/cproxy.c b/proxy/cproxy.c similarity index 100% rename from cproxy.c rename to proxy/cproxy.c diff --git a/nocproxy.c b/proxy/nocproxy.c similarity index 100% rename from nocproxy.c rename to proxy/nocproxy.c diff --git a/noproxy.c b/proxy/noproxy.c similarity index 100% rename from noproxy.c rename to proxy/noproxy.c diff --git a/nosshproxy.c b/proxy/nosshproxy.c similarity index 100% rename from nosshproxy.c rename to proxy/nosshproxy.c diff --git a/pproxy.c b/proxy/pproxy.c similarity index 100% rename from pproxy.c rename to proxy/pproxy.c diff --git a/proxy.c b/proxy/proxy.c similarity index 100% rename from proxy.c rename to proxy/proxy.c diff --git a/proxy.h b/proxy/proxy.h similarity index 100% rename from proxy.h rename to proxy/proxy.h diff --git a/sshproxy.c b/proxy/sshproxy.c similarity index 100% rename from sshproxy.c rename to proxy/sshproxy.c diff --git a/unix/CMakeLists.txt b/unix/CMakeLists.txt index a2332473..825ac35f 100644 --- a/unix/CMakeLists.txt +++ b/unix/CMakeLists.txt @@ -138,7 +138,7 @@ if(GTK_FOUND) x11.c noise.c ${CMAKE_SOURCE_DIR}/ssh/x11fwd.c - ${CMAKE_SOURCE_DIR}/nosshproxy.c) + ${CMAKE_SOURCE_DIR}/proxy/nosshproxy.c) target_link_libraries(pageant eventloop console agent settings network crypto utils ${GTK_LIBRARIES}) @@ -149,7 +149,7 @@ if(GTK_FOUND) main-gtk-simple.c ${CMAKE_SOURCE_DIR}/be_none.c ${CMAKE_SOURCE_DIR}/nogss.c - ${CMAKE_SOURCE_DIR}/nosshproxy.c + ${CMAKE_SOURCE_DIR}/proxy/nosshproxy.c pty.c) target_link_libraries(pterm guiterminal eventloop settings charset utils @@ -162,7 +162,7 @@ if(GTK_FOUND) ${CMAKE_SOURCE_DIR}/nocmdline.c ${CMAKE_SOURCE_DIR}/be_none.c ${CMAKE_SOURCE_DIR}/nogss.c - ${CMAKE_SOURCE_DIR}/nosshproxy.c + ${CMAKE_SOURCE_DIR}/proxy/nosshproxy.c pty.c) target_link_libraries(ptermapp guiterminal eventloop settings charset utils @@ -196,8 +196,8 @@ if(GTK_FOUND) ${CMAKE_SOURCE_DIR}/be_nos_s.c ${CMAKE_SOURCE_DIR}/nogss.c ${CMAKE_SOURCE_DIR}/norand.c - ${CMAKE_SOURCE_DIR}/nocproxy.c - ${CMAKE_SOURCE_DIR}/nosshproxy.c) + ${CMAKE_SOURCE_DIR}/proxy/nocproxy.c + ${CMAKE_SOURCE_DIR}/proxy/nosshproxy.c) target_link_libraries(puttytel guiterminal eventloop otherbackends settings network charset utils ${GTK_LIBRARIES} ${X11_LIBRARIES}) diff --git a/unix/local-proxy.c b/unix/local-proxy.c index c8663928..583bb75a 100644 --- a/unix/local-proxy.c +++ b/unix/local-proxy.c @@ -12,7 +12,7 @@ #include "tree234.h" #include "putty.h" #include "network.h" -#include "proxy.h" +#include "proxy/proxy.h" Socket *platform_new_connection(SockAddr *addr, const char *hostname, int port, bool privport, diff --git a/unix/sharing.c b/unix/sharing.c index 58038ab9..66628723 100644 --- a/unix/sharing.c +++ b/unix/sharing.c @@ -16,7 +16,7 @@ #include "tree234.h" #include "putty.h" #include "network.h" -#include "proxy.h" +#include "proxy/proxy.h" #include "ssh.h" #define CONNSHARE_SOCKETDIR_PREFIX "/tmp/putty-connshare" diff --git a/windows/CMakeLists.txt b/windows/CMakeLists.txt index dc97e675..c432c6e5 100644 --- a/windows/CMakeLists.txt +++ b/windows/CMakeLists.txt @@ -111,8 +111,8 @@ add_executable(puttytel ${CMAKE_SOURCE_DIR}/be_nos_s.c ${CMAKE_SOURCE_DIR}/nogss.c ${CMAKE_SOURCE_DIR}/norand.c - ${CMAKE_SOURCE_DIR}/nocproxy.c - ${CMAKE_SOURCE_DIR}/nosshproxy.c + ${CMAKE_SOURCE_DIR}/proxy/nocproxy.c + ${CMAKE_SOURCE_DIR}/proxy/nosshproxy.c puttytel.rc) add_dependencies(puttytel generated_licence_h) target_link_libraries(puttytel @@ -152,7 +152,7 @@ if(HAVE_CONPTY) be_conpty.c ${CMAKE_SOURCE_DIR}/nogss.c ${CMAKE_SOURCE_DIR}/norand.c - ${CMAKE_SOURCE_DIR}/nosshproxy.c + ${CMAKE_SOURCE_DIR}/proxy/nosshproxy.c pterm.rc) add_dependencies(pterm generated_licence_h) target_link_libraries(pterm diff --git a/windows/local-proxy.c b/windows/local-proxy.c index ddbdb97c..9672ddbe 100644 --- a/windows/local-proxy.c +++ b/windows/local-proxy.c @@ -10,7 +10,7 @@ #include "tree234.h" #include "putty.h" #include "network.h" -#include "proxy.h" +#include "proxy/proxy.h" Socket *platform_new_connection(SockAddr *addr, const char *hostname, int port, bool privport, diff --git a/windows/named-pipe-client.c b/windows/named-pipe-client.c index b827dd0d..e6ec5312 100644 --- a/windows/named-pipe-client.c +++ b/windows/named-pipe-client.c @@ -8,7 +8,7 @@ #include "tree234.h" #include "putty.h" #include "network.h" -#include "proxy.h" +#include "proxy/proxy.h" #include "ssh.h" #include "security-api.h" diff --git a/windows/named-pipe-server.c b/windows/named-pipe-server.c index a9271c16..d6d8d1c8 100644 --- a/windows/named-pipe-server.c +++ b/windows/named-pipe-server.c @@ -8,7 +8,7 @@ #include "tree234.h" #include "putty.h" #include "network.h" -#include "proxy.h" +#include "proxy/proxy.h" #include "ssh.h" #include "security-api.h" diff --git a/windows/sharing.c b/windows/sharing.c index 6ded0716..02eeb087 100644 --- a/windows/sharing.c +++ b/windows/sharing.c @@ -8,7 +8,7 @@ #include "tree234.h" #include "putty.h" #include "network.h" -#include "proxy.h" +#include "proxy/proxy.h" #include "ssh.h" #include "cryptoapi.h"