Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
28d3632
fix(ssl): fix missing hostname verification
parfeon Nov 12, 2025
a61d3ba
test: addtress Codacy warnings
parfeon Nov 13, 2025
b7c6bd9
Fix DNS enumeration on Windows by accepting adapters with valid IPs w…
KGronek-Pubnub Nov 13, 2025
1eaa1c7
refactor(dns-windows): replace `DnsQueryConfig` with `GetBestInterface`
parfeon Nov 14, 2025
b51e034
Update windows/pubnub_dns_system_servers.c
parfeon Nov 14, 2025
ce061ad
refactor: apply changes according to the review notes
parfeon Nov 14, 2025
27048e2
feat(ssl): add SNI support for TLS connections
parfeon Nov 16, 2025
84df0f6
refactor(ssl): actualize bundled certificates
parfeon Nov 17, 2025
5e71409
refactor(ssl): Add ISRG Root X1 Certificate
parfeon Nov 17, 2025
1ca3bca
build(cpp-windows): update included make files for OpenSSL version
parfeon Nov 17, 2025
0ddf134
PubNub SDK v6.1.0 release.
pubnub-release-bot Nov 17, 2025
24b83e1
docs(changelogs): fix change log entries
parfeon Nov 17, 2025
deffd7f
feat(ipv6): add IPv6 route detection
parfeon Nov 30, 2025
16c9886
Merge branch 'master' into refactor/improve-windows-dns-discovery
parfeon Dec 2, 2025
3459b4e
refactor(default): move default DNS definitions
parfeon Dec 2, 2025
d52a81b
fix(await): fix `pubnub_await` after `pubnub_cancel`
parfeon Dec 4, 2025
b683d5c
fix(windows): fix missing types
parfeon Dec 5, 2025
7d7ed16
fix(memory): fix layout of `pubnub_` struct
parfeon Dec 8, 2025
298e405
refactor: remove debug function call
parfeon Dec 8, 2025
386dd69
refactor: apply reviewer's suggestion
parfeon Dec 10, 2025
de94f42
PubNub SDK v6.2.0 release.
pubnub-release-bot Dec 10, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 33 additions & 8 deletions .pubnub.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,33 @@
name: c-core
schema: 1
version: "6.1.0"
version: "6.2.0"
scm: github.com/pubnub/c-core
changelog:
- date: 2025-12-10
version: v6.2.0
changes:
- type: feature
text: "Add working IPv6 route detection to decide the preferable connection interface."
- type: feature
text: "When built with `PUBNUB_DNS_SERVERS_VALIDATION_TIMEOUT` set to delay in milliseconds, system DNS servers' discovery will make an actual DNS query, and the value will be used as a request timeout."
- type: feature
text: "Add handling of the IPv6 proxy address provided by automated (or PAC) proxy discovery API."
- type: bug
text: "Fix issue because of which `pubnub_await` wasn't waiting after `pubnub_cancel` has been called."
- type: bug
text: "Fix `WinHttpGetProxyForUrl` usage with URL with schema instead of domain only."
- type: bug
text: "Fix issue with `/etc/resolv.conf` parsing where untrimmed string produced wrong address."
- type: bug
text: "Some Windows-related interfaces, because of different `pubnub_` struct layouts caused by different `pubnub_config.h` type aliases and pre-processing macros, accessed and modified wrong fields."
- type: bug
text: "Fix `set_from_url4proxy` for proper `lpszProxy` parsing."
- type: improvement
text: "Add defaults for `PUBNUB_ADVANCED_KEEP_ALIVE` in all related `pubnub_config.h` files."
- type: improvement
text: "When built with IPv6 support, first try to use any of the user-provided IPv6 DNS servers before falling back to the user-provided IPv4 before falling back to the address provided by a well-known DNS provider."
- type: improvement
text: "When built with IPv6 support, SDK will send two queries to receive both records and decide which will be most suitable for currently available routing."
- date: 2025-11-17
version: v6.1.0
changes:
Expand Down Expand Up @@ -1065,7 +1090,7 @@ sdks:
distribution-type: source code
distribution-repository: GitHub release
package-name: C-Core
location: https://github.com/pubnub/c-core/releases/tag/v6.1.0
location: https://github.com/pubnub/c-core/releases/tag/v6.2.0
requires:
-
name: "miniz"
Expand Down Expand Up @@ -1131,7 +1156,7 @@ sdks:
distribution-type: source code
distribution-repository: GitHub release
package-name: C-Core
location: https://github.com/pubnub/c-core/releases/tag/v6.1.0
location: https://github.com/pubnub/c-core/releases/tag/v6.2.0
requires:
-
name: "miniz"
Expand Down Expand Up @@ -1197,7 +1222,7 @@ sdks:
distribution-type: source code
distribution-repository: GitHub release
package-name: C-Core
location: https://github.com/pubnub/c-core/releases/tag/v6.1.0
location: https://github.com/pubnub/c-core/releases/tag/v6.2.0
requires:
-
name: "miniz"
Expand Down Expand Up @@ -1259,7 +1284,7 @@ sdks:
distribution-type: source code
distribution-repository: GitHub release
package-name: C-Core
location: https://github.com/pubnub/c-core/releases/tag/v6.1.0
location: https://github.com/pubnub/c-core/releases/tag/v6.2.0
requires:
-
name: "miniz"
Expand Down Expand Up @@ -1320,7 +1345,7 @@ sdks:
distribution-type: source code
distribution-repository: GitHub release
package-name: C-Core
location: https://github.com/pubnub/c-core/releases/tag/v6.1.0
location: https://github.com/pubnub/c-core/releases/tag/v6.2.0
requires:
-
name: "miniz"
Expand Down Expand Up @@ -1376,7 +1401,7 @@ sdks:
distribution-type: source code
distribution-repository: GitHub release
package-name: C-Core
location: https://github.com/pubnub/c-core/releases/tag/v6.1.0
location: https://github.com/pubnub/c-core/releases/tag/v6.2.0
requires:
-
name: "miniz"
Expand Down Expand Up @@ -1429,7 +1454,7 @@ sdks:
distribution-type: source code
distribution-repository: GitHub release
package-name: C-Core
location: https://github.com/pubnub/c-core/releases/tag/v6.1.0
location: https://github.com/pubnub/c-core/releases/tag/v6.2.0
requires:
-
name: "miniz"
Expand Down
20 changes: 20 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
## v6.2.0
December 10 2025

#### Added
- Add working IPv6 route detection to decide the preferable connection interface.
- When built with `PUBNUB_DNS_SERVERS_VALIDATION_TIMEOUT` set to delay in milliseconds, system DNS servers' discovery will make an actual DNS query, and the value will be used as a request timeout.
- Add handling of the IPv6 proxy address provided by automated (or PAC) proxy discovery API.

#### Fixed
- Fix issue because of which `pubnub_await` wasn't waiting after `pubnub_cancel` has been called.
- Fix `WinHttpGetProxyForUrl` usage with URL with schema instead of domain only.
- Fix issue with `/etc/resolv.conf` parsing where untrimmed string produced wrong address.
- Some Windows-related interfaces, because of different `pubnub_` struct layouts caused by different `pubnub_config.h` type aliases and pre-processing macros, accessed and modified wrong fields.
- Fix `set_from_url4proxy` for proper `lpszProxy` parsing.

#### Modified
- Add defaults for `PUBNUB_ADVANCED_KEEP_ALIVE` in all related `pubnub_config.h` files.
- When built with IPv6 support, first try to use any of the user-provided IPv6 DNS servers before falling back to the user-provided IPv4 before falling back to the address provided by a well-known DNS provider.
- When built with IPv6 support, SDK will send two queries to receive both records and decide which will be most suitable for currently available routing.

## v6.1.0
November 17 2025

Expand Down
34 changes: 26 additions & 8 deletions core/pubnub_dns_servers.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ struct pubnub_ipv6_address {
};

/* primary, secondary(ipv4, ipv6) and default dns server */
#define PUBNUB_MAX_DNS_SERVERS_MASK 0x10
#define PUBNUB_MAX_DNS_SERVERS_MASK 0x10
#else
/* primary, secondary(ipv4) and default dns server */
#define PUBNUB_MAX_DNS_SERVERS_MASK 0x04
Expand Down Expand Up @@ -122,13 +122,12 @@ PUBNUB_EXTERN int pubnub_get_dns_secondary_server_ipv4(struct pubnub_ipv4_addres

@param[out] o_ipv4 The array where to put the system DNS servers.
allocated by the caller for @p n elements.

@param[in] n The number of elements allocated for the @p o_ipv4
@retval -1: error, can't read DNS server configuration
@retval otherwise: number of DNS servers read
*/
PUBNUB_EXTERN int pubnub_dns_read_system_servers_ipv4(struct pubnub_ipv4_address* o_ipv4,
size_t n);
size_t n);
#if PUBNUB_USE_IPV6
/** Sets the primary DNS server IPv6 address to use when
resolving the Pubnub origin, in binary form(network order).
Expand Down Expand Up @@ -162,7 +161,7 @@ PUBNUB_EXTERN int pubnub_dns_set_secondary_server_ipv6(struct pubnub_ipv6_addres
/** Sets the primary DNS server IPv6 address from the corresponding
'numbers-and-colons' notation string to use when resolving the Pubnub origin.
Applies to all subsequent DNS queries, if successful.
(Note: All DNS servers are initially set to zeros)
(Note: All DNS servers are initially set to zeros)

@param ipv6_str The IPv6 address string of the server to use. Set all
zeros("::0", or "0::") to not use this DNS server.
Expand All @@ -178,7 +177,7 @@ PUBNUB_EXTERN int pubnub_dns_set_primary_server_ipv6_str(char const* ipv6_str);
Applies to all subsequent DNS queries, if successful and if
using secondary server is supported. Secondary server, if
used at all, is used if a query to the primary server fails.
(Note: All DNS servers are initially set to zeros)
(Note: All DNS servers are initially set to zeros)

@param ipv6_str The IPv6 address string of the server to use. Set all
zeros("::0", or "0::") to not use this DNS server.
Expand Down Expand Up @@ -207,10 +206,28 @@ PUBNUB_EXTERN int pubnub_get_dns_primary_server_ipv6(struct pubnub_ipv6_address*
the secondary Ipv6 DNS server
*/
PUBNUB_EXTERN int pubnub_get_dns_secondary_server_ipv6(struct pubnub_ipv6_address* o_ipv6);
#endif /* PUBNUB_USE_IPV6 */

#else
/** Reads the DNS servers in the system configuration. Will read
at most @p n servers, even if more are configured. Keep in
mind that modern systems have complex configurations and
often this will yield just one DNS server which listens on the
loopback IP address, while the "real" DNS configuration is
not available through standard means.

On POSIX systems, this will read from `/etc/resolv.conf`,
looking for `nameserver` lines. On Windows, this will use OS
functions to get the info.

@param[out] o_ipv6 The array where to put the system DNS servers.
allocated by the caller for @p n elements.
@param[in] n The number of elements allocated for the @p o_ipv6
@retval -1: error, can't read DNS server configuration
@retval otherwise: number of DNS servers read
*/
PUBNUB_EXTERN int pubnub_dns_read_system_servers_ipv6(struct pubnub_ipv6_address* o_ipv6,
size_t n);
#endif /* PUBNUB_USE_IPV6 */
#else /* PUBNUB_SET_DNS_SERVERS */
#define pubnub_dns_set_primary_server_ipv4(ipv4) -1
#define pubnub_dns_set_secondary_server_ipv4(ipv4) -1
#define pubnub_dns_set_primary_server_ipv4_str(ipv4_str) -1
Expand All @@ -225,6 +242,7 @@ PUBNUB_EXTERN int pubnub_get_dns_secondary_server_ipv6(struct pubnub_ipv6_addres
#define pubnub_dns_set_secondary_server_ipv6_str(ipv6_str) -1
#define pubnub_get_dns_primary_server_ipv6(o_ipv6) -1
#define pubnub_get_dns_secondary_server_ipv6(o_ipv6) -1
#define pubnub_dns_read_system_servers_ipv6(o_ipv4, n) -1
#endif /* PUBNUB_USE_IPV6 */
#endif /* PUBNUB_SET_DNS_SERVERS */
#endif /* !PUBNUB_SET_DNS_SERVERS */
#endif /* !defined INC_PUBNUB_DNS_SERVERS */
Loading
Loading