[vlc-commits] [Git][videolan/vlc][master] 3 commits: po: do not scan tcp.c

Steve Lhomme (@robUx4) gitlab at videolan.org
Mon Oct 13 08:00:53 UTC 2025



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
03242431 by Rémi Denis-Courmont at 2025-10-13T07:40:07+00:00
po: do not scan tcp.c

There are no localised strings in there.

- - - - -
3be85189 by Rémi Denis-Courmont at 2025-10-13T07:40:07+00:00
lua: appropriate tcp.c

This is the only use left. Most outbound TCP connections are made with
ad-hoc code in underlying library outside of VLC or with the newer
`vlc_tls_SocketOpenTCP()`. Notably FTP and HTTP modules use the
`vlc_tls_t` abstraction to support both unencrypted TCP and TLS over TCP.

- - - - -
61d2d59c by Rémi Denis-Courmont at 2025-10-13T07:40:07+00:00
lua: appropriate the SOCKS option

This is the only module using them. The option names are retained to
preserve compatibility with existing configuration files and command line
scripts (appending `lua-` would break that).

- - - - -


9 changed files:

- include/vlc_network.h
- modules/lua/Makefile.am
- modules/lua/libs.h
- src/network/tcp.c → modules/lua/libs/tcp.c
- modules/lua/vlc.c
- po/POTFILES.in
- src/Makefile.am
- src/libvlc-module.c
- src/libvlccore.sym


Changes:

=====================================
include/vlc_network.h
=====================================
@@ -184,9 +184,6 @@ VLC_API int * net_Listen(vlc_object_t *p_this, const char *psz_host, unsigned i_
 #define net_ListenTCP(a, b, c) net_Listen(VLC_OBJECT(a), b, c, \
                                           SOCK_STREAM, IPPROTO_TCP)
 
-VLC_API int net_ConnectTCP (vlc_object_t *obj, const char *host, int port);
-#define net_ConnectTCP(a, b, c) net_ConnectTCP(VLC_OBJECT(a), b, c)
-
 /**
  * Accepts an new connection on a set of listening sockets.
  *


=====================================
modules/lua/Makefile.am
=====================================
@@ -24,6 +24,7 @@ liblua_plugin_la_SOURCES = \
 	lua/libs/sd.c \
 	lua/libs/stream.c \
 	lua/libs/strings.c \
+	lua/libs/tcp.c \
 	lua/libs/variables.c lua/libs/variables.h \
 	lua/libs/video.c \
 	lua/libs/vlm.c \


=====================================
modules/lua/libs.h
=====================================
@@ -58,4 +58,6 @@ void luaopen_win( lua_State *L );
 int vlclua_url_parse( lua_State *L );
 int vlclua_input_item_get( lua_State *L, input_item_t *p_item );
 
+int net_ConnectTCP(vlc_object_t *, const char *, int);
+
 #endif


=====================================
src/network/tcp.c → modules/lua/libs/tcp.c
=====================================
@@ -35,6 +35,7 @@
 
 #include <vlc_network.h>
 #include <vlc_interrupt.h>
+#include "../libs.h"
 
 /*****************************************************************************
  * SocksNegotiate:


=====================================
modules/lua/vlc.c
=====================================
@@ -61,6 +61,19 @@
 #define INDEX_TEXT N_( "Directory index" )
 #define INDEX_LONGTEXT N_( "Allow to build directory index" )
 
+#define SOCKS_SERVER_TEXT N_("SOCKS server")
+#define SOCKS_SERVER_LONGTEXT N_( \
+    "SOCKS proxy server to use. This must be of the form " \
+    "address:port. It will be used for all TCP connections" )
+
+#define SOCKS_USER_TEXT N_("SOCKS user name")
+#define SOCKS_USER_LONGTEXT N_( \
+    "User name to be used for connection to the SOCKS proxy." )
+
+#define SOCKS_PASS_TEXT N_("SOCKS password")
+#define SOCKS_PASS_LONGTEXT N_( \
+    "Password to be used for connection to the SOCKS proxy." )
+
 #define TELNETHOST_TEXT N_( "Host" )
 #define TELNETHOST_LONGTEXT N_( "This is the host on which the " \
     "interface will listen. It defaults to all network interfaces (0.0.0.0)." \
@@ -649,6 +662,14 @@ vlc_module_begin ()
         set_callbacks( Open_LuaIntf, Close_LuaIntf )
         add_shortcut( "luaintf" )
 
+        set_section( N_( "Socks proxy") , NULL )
+        add_string( "socks", NULL,
+                    SOCKS_SERVER_TEXT, SOCKS_SERVER_LONGTEXT )
+        add_string( "socks-user", NULL,
+                    SOCKS_USER_TEXT, SOCKS_USER_LONGTEXT )
+        add_password( "socks-pwd", NULL,
+                      SOCKS_PASS_TEXT, SOCKS_PASS_LONGTEXT )
+
     add_submodule ()
         set_section( N_("Lua HTTP"), 0 )
             add_password("http-password", NULL, PASS_TEXT, PASS_LONGTEXT)


=====================================
po/POTFILES.in
=====================================
@@ -111,7 +111,6 @@ src/network/getaddrinfo.c
 src/network/httpd.c
 src/network/io.c
 src/network/rootbind.c
-src/network/tcp.c
 src/network/tls.c
 src/network/udp.c
 src/player/osd.c


=====================================
src/Makefile.am
=====================================
@@ -367,7 +367,6 @@ libvlccore_la_SOURCES = \
 	network/http_auth.c \
 	network/httpd.c \
 	network/io.c \
-	network/tcp.c \
 	network/udp.c \
 	network/rootbind.c \
 	network/stream.c \


=====================================
src/libvlc-module.c
=====================================
@@ -970,19 +970,6 @@ static const char* const ppsz_restore_playback_desc[] = {
 #define PROXY_PASS_LONGTEXT N_( \
     "If your HTTP proxy requires a password, set it here." )
 
-#define SOCKS_SERVER_TEXT N_("SOCKS server")
-#define SOCKS_SERVER_LONGTEXT N_( \
-    "SOCKS proxy server to use. This must be of the form " \
-    "address:port. It will be used for all TCP connections" )
-
-#define SOCKS_USER_TEXT N_("SOCKS user name")
-#define SOCKS_USER_LONGTEXT N_( \
-    "User name to be used for connection to the SOCKS proxy." )
-
-#define SOCKS_PASS_TEXT N_("SOCKS password")
-#define SOCKS_PASS_LONGTEXT N_( \
-    "Password to be used for connection to the SOCKS proxy." )
-
 #define META_TITLE_TEXT N_("Title metadata")
 #define META_TITLE_LONGTEXT N_( \
      "Allows you to specify a \"title\" metadata for an input.")
@@ -1963,15 +1950,6 @@ vlc_module_begin ()
 #endif
     add_obsolete_bool( "http-use-IE-proxy" ) /* since 4.0.0 */
 
-    set_section( N_( "Socks proxy") , NULL )
-    add_string( "socks", NULL,
-                 SOCKS_SERVER_TEXT, SOCKS_SERVER_LONGTEXT )
-    add_string( "socks-user", NULL,
-                 SOCKS_USER_TEXT, SOCKS_USER_LONGTEXT )
-    add_password( "socks-pwd", NULL,
-                 SOCKS_PASS_TEXT, SOCKS_PASS_LONGTEXT )
-
-
     set_section( N_("Metadata" ) , NULL )
     add_string( "meta-title", NULL, META_TITLE_TEXT,
                 META_TITLE_LONGTEXT )


=====================================
src/libvlccore.sym
=====================================
@@ -310,7 +310,6 @@ vlc_tick_wait
 net_Accept
 net_Connect
 net_ConnectDgram
-net_ConnectTCP
 net_Listen
 net_ListenClose
 net_OpenDgram



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/ba45237a4562ac418f24a5e29db55247b301005c...61d2d59cc79cd479daecb2ff8e20624ab6abc24c

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/ba45237a4562ac418f24a5e29db55247b301005c...61d2d59cc79cd479daecb2ff8e20624ab6abc24c
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the vlc-commits mailing list