Skip to content

Commit

Permalink
Check libproxy during session creation
Browse files Browse the repository at this point in the history
Give libproxy a chance to automatically set the correct proxy without
additional client configuration.
  • Loading branch information
janbrummer authored and notroj committed Oct 3, 2023
1 parent 5b58d7b commit 129d764
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
8 changes: 8 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,14 @@ if test "$enable_memleak" = "yes"; then
ALLOW_INSTALL=memleak
fi

AC_ARG_ENABLE(auto-libproxy,
AS_HELP_STRING([--enable-auto-libproxy],
[for using libproxy during session creation]))

if test "$enable_auto_libproxy" = "yes"; then
AC_DEFINE(NE_ENABLE_AUTO_LIBPROXY, 1, [to use libproxy automatically])
fi

# Enable tests for optional features
TESTS="\$(BASIC_TESTS)"
HELPERS=""
Expand Down
4 changes: 4 additions & 0 deletions src/ne_session.c
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,10 @@ ne_session *ne_session_create(const char *scheme,
/* Set flags which default to on: */
sess->flags[NE_SESSFLAG_PERSIST] = 1;

#ifdef NE_ENABLE_AUTO_LIBPROXY
ne_session_system_proxy(sess, 0);
#endif

return sess;
}

Expand Down

0 comments on commit 129d764

Please sign in to comment.