Commit Graph

1264 Commits

Author SHA1 Message Date
86b1a41492 * The test case written for QUIC is working with some issues. [skip ci]
* While building the file, the server that is created as the child process is not getting exited.
* But the server is terminated while the test is run individually.
2024-02-06 01:59:17 +05:30
4ce848fb09 * Changes made in the quic_test_util.c to eshtablish connection between client and server [skip ci]
* The meesage sent is not still received to the client from the echo server;wq
2024-01-15 16:37:00 +05:30
c4faaac4b9 * Inital code written for a QUIC server for testing. [skip ci]
* Created quic_test_util.c/.h and function to start the server with all the helper functions present here.
2023-09-27 03:05:21 +05:30
9b803acdbf Fix coding style 2023-12-17 20:58:10 +01:00
5e21ba09d7 * Added ssl_quic_gnutls.c in the makefile to revert unnecessary changes due to previous rebase [skip ci] 2023-12-17 20:58:10 +01:00
8c660432a7 * Documentation for functions added [skip ci] 2023-12-17 20:58:09 +01:00
a9c198fbd9 * changes made to discard wget_http3_connection and use wget_http_connection for http3 [skip ci] 2023-12-17 20:58:09 +01:00
a987ea0e76 * implemented wget_http3_close [skip ci]
* gaurded http3 functions to check availablility of nghttp3 library
* some functions renamed to keep only specific functions of http3 public
2023-12-17 20:58:09 +01:00
2564072c93 * changes made as pers suggestions [skip ci]
* restored the original signature of wget_dns_resolve
* added a check in the wget_quic_connect and wget_tcp_connect to check for respective socketypes
2023-12-17 20:58:03 +01:00
74a14d2cd1 * changes made as per suggestions [skip ci]
* wget_http3_get_response returns the data that the http3 client stream has read
* all fprintf converted into debug_printf and error_printf
* fixed issues mentioned in the thread
2023-12-17 20:12:09 +01:00
f498822fb8 * changes made in the code as per suggestions [skip ci]
* used wget_http_request to create a http3 request
* wget_http3_get_response implemented to read the response
2023-12-17 20:12:09 +01:00
988131a401 * read for http3 working
* callback functions for closing the HTTP/3 and QUIC streams to be implemented.
2023-12-17 20:12:09 +01:00
d9017b8283 * ISSUE 10-16 : changes made as per suggestions [skip ci]
* defined local and remote info_addr in wget_quic_st as local
* removed _set_async function call as it was redundant
* if wget_ssl_quic_open fails, closed the socket
* implemented log_printf using wget_debug_vprintf
* called wget_printf_exit if gnutls_rnd fails
* checked the input value of handshake_read()
2023-12-17 20:12:09 +01:00
5ae01a01f2 * ISSUE 2-8 : changes made in the code as per suggestions [skip ci]
* guarded functions and headers in quic.c and net.c using WITH_NGTCP2
* used wget_debug_printf and wget_error_printf in quic.c
* removed handshake_completed_db and handshake_confirmed_cb
* removed connection_write and connection_read
2023-12-17 20:12:09 +01:00
01950d5e91 * ISSUE 1: wget_dns_resolve_quic and wget_dns_resolve issue resolved [skip ci] 2023-12-17 20:12:01 +01:00
f3628ab839 * Changes internal implementation of byte to indicalte type of byte getting stored [skip ci]
* Also changes internal implementation of queue for testing a issue
* ISSUE : Example quic_read_write receives a packet twice
2023-12-17 20:08:06 +01:00
0ab20a5535 * some callback functions implemented and some improved for nghttp3 as well as ngtcp2 [skip ci]
* implemented a new function wget_quic_stream_set_stream to initialise a new stream with provided
  stream_id and add it to the wget_quic stack
2023-12-17 20:08:06 +01:00
fbe5561da7 * basic implementation of http3 stack over quic stack completed [skip ci]
* implementated very basic callback functions for http3
* implemented wget_http3_send_request to create a http3 requests
* reimplemented the internal working of wget_queue_peak_untransmitted
* example code for sending http3 request implemented
2023-12-17 20:08:06 +01:00
f667f2c826 * Changes made to fix resending of already sent data in wget_quic_write [skip ci]
* Added a bool in wget_byte struct named transmitted
* Implemented function wget_queue_peak_untransmitted_data
* This function will return first untransmitted byte
* Implemented wget_http3_deinit
2023-12-17 20:08:06 +01:00
f91c18cd8a * wget_http3_init implemented [skip ci]
* created http3.c and http3.h and implemented wget_http3_connection_st
* implemented http3 initialisation function to intialise the http3_connection struct
* shifted stream functions to a seperate stream.c file
2023-12-17 20:08:06 +01:00
9ba843978c * integrated nghttp3 with wget2 library [skip ci] 2023-12-17 20:08:06 +01:00
6803b4aadf * Changes made as per suggestions in wget_quic_rw_once [skip ci]
* wget_quic_rw_once will do read-write cycle once
* changes made for consistency with kernel coding style
2023-12-17 20:08:06 +01:00
da4bbb6656 * wget_quic_once implemented which does a complete write and read cycle [skip ci] 2023-12-17 20:08:06 +01:00
14945f984e * wget_quic_ack implemented [skip ci]
* The motivation for implementation is multiple number of packets
  sent from server for a single packet sent from client
2023-12-17 20:08:06 +01:00
d53f19fc1d * Amendments made in the code as per suggestions [skip ci]
* Removed unnecessary getter-setter functions implemented
* implemented getter-setter for config in quic's ssl
2023-12-17 20:08:06 +01:00
0ec81fb379 * wget_quic_read function working [skip ci]
* quic_write_read.c file created to demonstrate the working of wget_quic_read
  and wget_quic_write hand in hand while configuring it to the QUIC ECHO server
2023-12-17 20:08:06 +01:00
3b99e07f49 * wget_quic_write function working [skip ci]
* quic_write.c file created to make provide a example of write.
* A sample string initially pushed into the stream and then the stream
  structure further utilised for sending the data over socket.
2023-12-17 20:08:06 +01:00
aad7bb1516 * Changes made in the code as per suggestions
* wget_quic_deinit added
* now the code has only wget_quic struct instead of two structs
* created new file named ssl_quic_gnutls.c
2023-12-17 20:08:06 +01:00
f8c95a9ad9 * QUIC Handshake working with QUIC Echo server [skip ci]
* Simplified the implementation of wget_quic_connect() and wget_ssl_quic_connect()
* Segregated the function wget_quic_connect into wget_quic_connect and wget_quic_handshake
2023-12-17 20:07:33 +01:00
fea161ffd1 * Added testing code to test wget_quic_connect.
* Test is failing due to retry_aead_ctx issue in handshake_read function
2023-12-17 20:06:18 +01:00
fa29a35376 * Implemented wget_quic_read. wget2 library integrated with ngtcp2 is ready for building. [skip ci] 2023-12-17 20:02:28 +01:00
12a87f748e * Changes made for building the library for testing QUIC. Not Working [skip ci] 2023-12-17 20:02:28 +01:00
f27b851a67 * wget_quic_write implemented [skip ci] 2023-12-17 20:02:28 +01:00
e3b6596af6 * Restored signatures of public functions and created seperate file for quic related function. [skip ci]
* Restored signatures of wget_ssl_open and wget_ssl_init and created new functions for quic related SSL set up.
* Moved all the quic related file to a new file named quic.c from net.c
2023-12-17 20:02:28 +01:00
afd302cb9a * Added quic_handshake in the wget_quic_open function completing the function [skip ci] 2023-12-17 20:02:28 +01:00
853a6cf744 * Generalised function wget_ssl_init for QUIC as well as TCP. Completed the wget_quic_connect function without handshake. [skip ci] 2023-12-17 20:02:15 +01:00
b02f642f19 * Altered wget_quic struct to include DNS [skip ci]
* net.c : wget_quic_connect edited to use DNS for resolving
* dns.c : resolve and wget_dns_resolve edited to resolve for SOCK_DGRAM as well as SOCK_STREAM
2023-12-17 19:59:41 +01:00
6f3d2b0dac *Basic implementation of integration with ngtcp2 [skip ci]
*net.c : wget_quic_connet function implemented
*ssl_gnutls.c : wget_ssl_quic_open and wget_ssl_quic_open functions implemented
*queue.c: Implementation of queue using linked list
2023-12-17 19:51:55 +01:00
52b7c4af88 Implementation of List and Queue Added. Added defination of some IMP structs 2023-12-17 19:51:55 +01:00
1bab5454f9 Fix IPv6 address representation
* libwget/dns.c (resolve): Fix IPv6 in debug message,
  (wget_dns_cache_ip): Fix IPv6 in error message,
  (wget_dns_resolve): Fix IPv6 in debug message.
* libwget/dns_cache.c (wget_dns_cache_get): Fix IPv6 in debug message.
* libwget/hsts.c (hsts_db_add_entry): Fix IPv6 in debug message.
* libwget/http.c (wget_http_create_request): Fix IPv6 in Host header,
  (establish_proxy_connect): Fix IPv6 in CONNECT and in Host header.
* libwget/ip.c (wget_ip_is_family): Cosmetic change.
* libwget/iri.c (wget_iri_get_connection_part): Fix IPv6 in URL creation.
* libwget/net.c (debug_addr): Fix IPv6 in debug message.
* src/options.c (stats_callback_dns): Fix IPv6 in output.
* src/wget.c (test_modify_hsts): Fix IPv6 in console output,
  (http_create_request): Fix IPv6 in Referer header.
* unit-tests/test.c (test_iri_parse): Add two IPv6 parsing tests.
* libwget/Makefile.am (libwget_dnscache.la): Link with libwget_ip.la,
  (libwget_hsts.la): Link with libwget_ip.la.
2023-12-17 18:52:27 +01:00
ae24f83fd0 * libwget/netrc.c (wget_netrc_db_load): Add fetchmail compatibility (user and passwd) 2023-11-26 19:01:30 +01:00
8271687e29 Rename internal functions 2023-11-18 18:45:35 +00:00
b23c934422 Rename internal functions 2023-11-18 18:45:35 +00:00
a6ab8a1d0c Remove empty guard 2023-11-18 18:45:35 +00:00
0aa23dfc79 Fix NULLABLES 2023-11-18 18:45:35 +00:00
829528217c Extract common HTTP functions
* libwget/http.h: new functions wget_http_connection_is_aborted,
   wget_http_fix_broken_server_encoding,
   wget_decompress_get_body_cb, wget_decompress_error_handler_cb,
   wget_http2_open, wget_http2_close, wget_http2_send_request,
   wget_http2_get_response_cb
 * libwget/http2.c: new file
2023-11-18 18:45:35 +00:00
ec77b3ebf0 * libwget/http_parse.c: Make http_isseparator an inline function 2023-11-17 20:00:00 +01:00
7014ef7a51 * unit-tests/test.c: Add tests for wget_http_parse_full_date() 2023-11-17 19:40:51 +01:00
7bf93ff6c6 Add support for another non-standard cookie timstamp format
- example: Sun Nov 26 2023 21:24:47

* libwget/http_parse.c (wget_http_parse_full_date): Parse additional format.
2023-11-17 19:39:25 +01:00
1a886595e6 Add libproxy support
Add support for libproxy, which is capable to extract desktop
environment proxy configurations from dozens of systems and platforms.
This also enables wget to handle pac/wpad proxy server.

* configure.ac: Add check for libbproxy.
* libwget/http.c (wget_http_open): Retrieve proxy via libproxy.

Copyright-paperwork-exempt: Yes
2023-11-04 16:02:45 +00:00