nieluj / nntp-proxy Goto Github PK
View Code? Open in Web Editor NEWsimple NNTP proxy with SSL support
License: Other
simple NNTP proxy with SSL support
License: Other
hi,
and thanks for a great application!
But I'm wondering if it would it be possible to implement non-SSL connections ?
A possibility to disable logons into the nntp backend would also be appreciated ;)
thanks
frollic
Hi
Is this project still maintained and under development ?
Can the docs be updated to explain UDP usage:
netstat -lnptu | grep nntp-proxy
tcp 0 0 0.0.0.0:119 0.0.0.0:* LISTEN 7552/nntp-proxy
udp 0 0 0.0.0.0:39051 0.0.0.0:* 7552/nntp-proxy
udp 0 0 0.0.0.0:51992 0.0.0.0:* 7552/nntp-proxy
udp 0 0 0.0.0.0:45871 0.0.0.0:* 7552/nntp-proxy
Allow the users to be stored in a mysql database.
create database user_db;
use user_db;
create table user (
user_id int(6) not null auto_increment,
username varchar(16) not null,
password varchar(64) not null,
max_connections int(6)) not null
);
Hello,
I'm using your soft since few days and I noticed that the service stopped sometimes.
This happens during the closing of the customer and thus its disconnection.
I tried to reproduce the issue while running the program with gdb:
...
06/01/14 00:06:15 [common_readcb:508] client -> proxy: got 6 bytes to read
06/01/14 00:06:15 [common_readcb:517] [4] command finished, 207454 bytes transferred in 0.48 seconds (424.94 kb/s)
06/01/14 00:06:15 [common_readcb:521] [4] command from client: QUIT
06/01/14 00:06:15 [common_readcb:537] [4] command send to server: QUIT
06/01/14 00:06:15 [eventcb:881] event received for server connection
06/01/14 00:06:15 [eventcb:893] BEV_EVENT_ERROR
06/01/14 00:06:15 [eventcb:906] Error: Success
06/01/14 00:06:15 [close_server:404] closing server connection 1
06/01/14 00:06:16 [eventcb:883] event received for client connection
06/01/14 00:06:16 [eventcb:897] BEV_EVENT_EOF
06/01/14 00:06:16 [close_server:404] closing server connection 2
06/01/14 00:06:16 [close_client:379] closing client connection 2
06/01/14 00:06:16 [eventcb:883] event received for client connection
06/01/14 00:06:16 [eventcb:897] BEV_EVENT_EOF
06/01/14 00:06:16 [close_server:404] closing server connection 0
06/01/14 00:06:16 [close_client:379] closing client connection 0
Program received signal SIGPIPE, Broken pipe.
0x000074aab8321040 in write () from /lib/x86_64-linux-gnu/libc.so.6
(gdb)
This issue does not occur every time. From what I can understand, the process reveived a SIGPIPE and colse. SIGPIPE is sent to the process because it tried to write a socket that had been shutdown or is not connected anymore.
Each time there is a line "closing client connection" missing.
Do you have some suggestions? Is it possible to avoid this case?
Or should we make the process ignore SIGPIPE / add an handler for SIGPIPE doing nothing ?
Regards
PS: Un français de plus.
Disable posting access, only allow download ??
Can u add it ?
Is there a way i can automatically disconnect connection for user after he download an ARTICLE/BODY?
so one article and he got kicked from connection
via close_connection(conn); ??
My vps dont have libevent 2 and it wont works without it what i need to do ? Debian6
nntp-proxy.c:31:24: error: event2/dns.h: No such file or directory
nntp-proxy.c:32:36: error: event2/bufferevent_ssl.h: No such file or directory
nntp-proxy.c:33:32: error: event2/bufferevent.h: No such file or directory
nntp-proxy.c:34:27: error: event2/buffer.h: No such file or directory
nntp-proxy.c:35:29: error: event2/listener.h: No such file or directory
nntp-proxy.c:36:25: error: event2/util.h: No such file or directory
nntp-proxy.c: In function 'drained_writecb':
nntp-proxy.c:445: error: 'EV_WRITE' undeclared (first use in this function)
nntp-proxy.c:445: error: (Each undeclared identifier is reported only once
nntp-proxy.c:445: error: for each function it appears in.)
nntp-proxy.c:448: error: 'EV_READ' undeclared (first use in this function)
nntp-proxy.c: In function 'close_on_finished_writecb':
nntp-proxy.c:455: warning: initialization makes pointer from integer without a cast
nntp-proxy.c: In function 'common_readcb':
nntp-proxy.c:496: warning: assignment makes pointer from integer without a cast
nntp-proxy.c:500: warning: assignment makes pointer from integer without a cast
nntp-proxy.c:514: error: 'EVBUFFER_EOL_CRLF' undeclared (first use in this function)
nntp-proxy.c:544: error: 'EV_WRITE' undeclared (first use in this function)
nntp-proxy.c:545: error: 'EV_READ' undeclared (first use in this function)
nntp-proxy.c: In function 'connect_to_server':
nntp-proxy.c:681: error: 'BUFFEREVENT_SSL_CONNECTING' undeclared (first use in this function)
nntp-proxy.c:682: error: 'BEV_OPT_CLOSE_ON_FREE' undeclared (first use in this function)
nntp-proxy.c:682: error: 'BEV_OPT_DEFER_CALLBACKS' undeclared (first use in this function)
nntp-proxy.c:696: error: 'EV_READ' undeclared (first use in this function)
nntp-proxy.c:696: error: 'EV_WRITE' undeclared (first use in this function)
nntp-proxy.c: In function 'client_auth_readcb':
nntp-proxy.c:715: warning: assignment makes pointer from integer without a cast
nntp-proxy.c:716: warning: assignment makes pointer from integer without a cast
nntp-proxy.c:722: error: 'EVBUFFER_EOL_CRLF' undeclared (first use in this function)
nntp-proxy.c: In function 'server_auth_readcb':
nntp-proxy.c:803: warning: assignment makes pointer from integer without a cast
nntp-proxy.c:804: warning: assignment makes pointer from integer without a cast
nntp-proxy.c:810: error: 'EVBUFFER_EOL_CRLF' undeclared (first use in this function)
nntp-proxy.c:830: error: 'EV_READ' undeclared (first use in this function)
nntp-proxy.c: In function 'eventcb':
nntp-proxy.c:869: error: 'BEV_EVENT_READING' undeclared (first use in this function)
nntp-proxy.c:871: error: 'BEV_EVENT_WRITING' undeclared (first use in this function)
nntp-proxy.c:873: error: 'BEV_EVENT_ERROR' undeclared (first use in this function)
nntp-proxy.c:875: error: 'BEV_EVENT_TIMEOUT' undeclared (first use in this function)
nntp-proxy.c:877: error: 'BEV_EVENT_EOF' undeclared (first use in this function)
nntp-proxy.c:879: error: 'BEV_EVENT_CONNECTED' undeclared (first use in this function)
nntp-proxy.c:910: error: 'EV_READ' undeclared (first use in this function)
nntp-proxy.c:923: warning: assignment makes pointer from integer without a cast
nntp-proxy.c: At top level:
nntp-proxy.c:934: error: expected declaration specifiers or '...' before 'evutil_socket_t'
nntp-proxy.c:935: warning: 'struct evconnlistener' declared inside parameter list
nntp-proxy.c:935: warning: its scope is only this definition or declaration, which is probably not what you want
nntp-proxy.c: In function 'ssl_accept_cb':
nntp-proxy.c:957: error: 'sock' undeclared (first use in this function)
nntp-proxy.c:958: error: 'BUFFEREVENT_SSL_ACCEPTING' undeclared (first use in this function)
nntp-proxy.c:959: error: 'BEV_OPT_CLOSE_ON_FREE' undeclared (first use in this function)
nntp-proxy.c:959: error: 'BEV_OPT_DEFER_CALLBACKS' undeclared (first use in this function)
nntp-proxy.c:967: error: 'EV_READ' undeclared (first use in this function)
nntp-proxy.c:967: error: 'EV_WRITE' undeclared (first use in this function)
nntp-proxy.c: In function 'main':
nntp-proxy.c:1030: warning: assignment makes pointer from integer without a cast
nntp-proxy.c:1035: warning: assignment makes pointer from integer without a cast
nntp-proxy.c:1042: error: 'LEV_OPT_CLOSE_ON_FREE' undeclared (first use in this function)
nntp-proxy.c:1042: error: 'LEV_OPT_REUSEABLE' undeclared (first use in this function)
make: *** [nntp-proxy] Error 1
Hi,
Really good work with this updates (config files, ...)
Can you integrate multiple servers management ?
To permit aggregation of the connexion slots of the servers.
Server 1 : 20 slots
Server 2 : 10 slots
Regards,
P.S: tu n'etais pas a epitech par hasard ? (oui je suis francais mais je prefere l'anglais sur github)
Installed : sudo apt-get install libssl-dev libevent-dev libconfig-dev
Operating System Debian 6 64bit
gcc -g -c -Wall pkg-config --cflags libevent_openssl openssl libconfig
nntp-proxy.c -o nntp-proxy.o
Package libevent_openssl was not found in the pkg-config search path.
Perhaps you should add the directory containing `libevent_openssl.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libevent_openssl' found
nntp-proxy.c:31:24: error: event2/dns.h: No such file or directory
nntp-proxy.c:32:36: error: event2/bufferevent_ssl.h: No such file or directory
nntp-proxy.c:33:32: error: event2/bufferevent.h: No such file or directory
nntp-proxy.c:34:27: error: event2/buffer.h: No such file or directory
nntp-proxy.c:35:29: error: event2/listener.h: No such file or directory
nntp-proxy.c:36:25: error: event2/util.h: No such file or directory
nntp-proxy.c: In function 'close_client':
nntp-proxy.c:389: warning: implicit declaration of function 'bufferevent_free'
nntp-proxy.c: In function 'drained_writecb':
nntp-proxy.c:447: warning: implicit declaration of function 'bufferevent_setcb'
nntp-proxy.c:448: warning: implicit declaration of function 'bufferevent_setwatermark'
nntp-proxy.c:448: error: 'EV_WRITE' undeclared (first use in this function)
nntp-proxy.c:448: error: (Each undeclared identifier is reported only once
nntp-proxy.c:448: error: for each function it appears in.)
nntp-proxy.c:451: warning: implicit declaration of function 'bufferevent_enable'
nntp-proxy.c:451: error: 'EV_READ' undeclared (first use in this function)
nntp-proxy.c: In function 'close_on_finished_writecb':
nntp-proxy.c:458: warning: implicit declaration of function 'bufferevent_get_output'
nntp-proxy.c:458: warning: initialization makes pointer from integer without a cast
nntp-proxy.c:460: warning: implicit declaration of function 'evbuffer_get_length'
nntp-proxy.c: In function 'common_readcb':
nntp-proxy.c:499: warning: implicit declaration of function 'bufferevent_get_input'
nntp-proxy.c:499: warning: assignment makes pointer from integer without a cast
nntp-proxy.c:503: warning: assignment makes pointer from integer without a cast
nntp-proxy.c:517: warning: implicit declaration of function 'evbuffer_readln'
nntp-proxy.c:517: error: 'EVBUFFER_EOL_CRLF' undeclared (first use in this function)
nntp-proxy.c:521: warning: implicit declaration of function 'evbuffer_add_printf'
nntp-proxy.c:526: warning: assignment makes pointer from integer without a cast
nntp-proxy.c:529: warning: assignment makes pointer from integer without a cast
nntp-proxy.c:546: warning: implicit declaration of function 'evbuffer_add_buffer'
nntp-proxy.c:558: error: 'EV_WRITE' undeclared (first use in this function)
nntp-proxy.c:559: warning: implicit declaration of function 'bufferevent_disable'
nntp-proxy.c:559: error: 'EV_READ' undeclared (first use in this function)
nntp-proxy.c: In function 'connect_to_server':
nntp-proxy.c:696: warning: implicit declaration of function 'bufferevent_openssl_socket_new'
nntp-proxy.c:697: error: 'BUFFEREVENT_SSL_CONNECTING' undeclared (first use in this function)
nntp-proxy.c:698: error: 'BEV_OPT_CLOSE_ON_FREE' undeclared (first use in this function)
nntp-proxy.c:698: error: 'BEV_OPT_DEFER_CALLBACKS' undeclared (first use in this function)
nntp-proxy.c:706: warning: implicit declaration of function 'bufferevent_socket_connect_hostname'
nntp-proxy.c:712: error: 'EV_READ' undeclared (first use in this function)
nntp-proxy.c:712: error: 'EV_WRITE' undeclared (first use in this function)
nntp-proxy.c: In function 'client_auth_readcb':
nntp-proxy.c:731: warning: assignment makes pointer from integer without a cast
nntp-proxy.c:732: warning: assignment makes pointer from integer without a cast
nntp-proxy.c:738: error: 'EVBUFFER_EOL_CRLF' undeclared (first use in this function)
nntp-proxy.c: In function 'server_auth_readcb':
nntp-proxy.c:819: warning: assignment makes pointer from integer without a cast
nntp-proxy.c:820: warning: assignment makes pointer from integer without a cast
nntp-proxy.c:826: error: 'EVBUFFER_EOL_CRLF' undeclared (first use in this function)
nntp-proxy.c:846: error: 'EV_READ' undeclared (first use in this function)
nntp-proxy.c: In function 'print_openssl_err':
nntp-proxy.c:858: warning: implicit declaration of function 'bufferevent_get_openssl_error'
nntp-proxy.c: In function 'eventcb':
nntp-proxy.c:885: error: 'BEV_EVENT_READING' undeclared (first use in this function)
nntp-proxy.c:887: error: 'BEV_EVENT_WRITING' undeclared (first use in this function)
nntp-proxy.c:889: error: 'BEV_EVENT_ERROR' undeclared (first use in this function)
nntp-proxy.c:891: error: 'BEV_EVENT_TIMEOUT' undeclared (first use in this function)
nntp-proxy.c:893: error: 'BEV_EVENT_EOF' undeclared (first use in this function)
nntp-proxy.c:895: error: 'BEV_EVENT_CONNECTED' undeclared (first use in this function)
nntp-proxy.c:903: warning: implicit declaration of function 'evutil_socket_error_to_string'
nntp-proxy.c:903: warning: implicit declaration of function 'EVUTIL_SOCKET_ERROR'
nntp-proxy.c:905: warning: implicit declaration of function 'bufferevent_socket_get_dns_error'
nntp-proxy.c:907: warning: implicit declaration of function 'evutil_gai_strerror'
nntp-proxy.c:926: error: 'EV_READ' undeclared (first use in this function)
nntp-proxy.c:939: warning: assignment makes pointer from integer without a cast
nntp-proxy.c: At top level:
nntp-proxy.c:953: error: expected declaration specifiers or '...' before 'evutil_socket_t'
nntp-proxy.c:954: warning: 'struct evconnlistener' declared inside parameter list
nntp-proxy.c:954: warning: its scope is only this definition or declaration, which is probably not what you want
nntp-proxy.c: In function 'ssl_accept_cb':
nntp-proxy.c:976: error: 'sock' undeclared (first use in this function)
nntp-proxy.c:977: error: 'BUFFEREVENT_SSL_ACCEPTING' undeclared (first use in this function)
nntp-proxy.c:978: error: 'BEV_OPT_CLOSE_ON_FREE' undeclared (first use in this function)
nntp-proxy.c:978: error: 'BEV_OPT_DEFER_CALLBACKS' undeclared (first use in this function)
nntp-proxy.c:986: error: 'EV_READ' undeclared (first use in this function)
nntp-proxy.c:986: error: 'EV_WRITE' undeclared (first use in this function)
nntp-proxy.c:994: warning: implicit declaration of function 'evutil_closesocket'
nntp-proxy.c: In function 'main':
nntp-proxy.c:1037: warning: implicit declaration of function 'evutil_parse_sockaddr_port'
nntp-proxy.c:1049: warning: implicit declaration of function 'event_base_new'
nntp-proxy.c:1049: warning: assignment makes pointer from integer without a cast
nntp-proxy.c:1054: warning: implicit declaration of function 'evdns_base_new'
nntp-proxy.c:1054: warning: assignment makes pointer from integer without a cast
nntp-proxy.c:1060: warning: implicit declaration of function 'evconnlistener_new_bind'
nntp-proxy.c:1061: error: 'LEV_OPT_CLOSE_ON_FREE' undeclared (first use in this function)
nntp-proxy.c:1061: error: 'LEV_OPT_REUSEABLE' undeclared (first use in this function)
nntp-proxy.c:1071: warning: implicit declaration of function 'event_base_dispatch'
nntp-proxy.c:1075: warning: implicit declaration of function 'evconnlistener_free'
nntp-proxy.c:1076: warning: implicit declaration of function 'event_base_free'
nntp-proxy.c:1077: warning: implicit declaration of function 'evdns_base_free'
make: *** [nntp-proxy.o] Error 1
When a user connects, a connection is established to the parrent. When the user disconnects, the parent connection is tore down.
Can we keep parent connections open, and "pool" commands to the parent servers? Allow 20 parent connections, 60 (for example) user connections, and pool the commands - giving the user a timeout error should the queued command take too long to make it to the parent server?
Hi,
I have successfully installed nntp-proxy on a Centos 6.4, I've generated ssl key, but when my client try to connect to the proxies, I've this message in the debug console :
20/05/13 11:12:40 [eventcb:887] Error: Success
20/05/13 11:12:40 [close_client:376] closing client connection 0
20/05/13 11:12:43 [ssl_accept_cb:940] new connection from [ MYIP ]
20/05/13 11:12:43 [get_next_conn:194] Connection 0 is available
20/05/13 11:12:43 [eventcb:864] event received for client connection
20/05/13 11:12:43 [eventcb:874] BEV_EVENT_ERROR
unknown protocol in SSL routines SSL23_GET_CLIENT_HELLO
And I can't login on the proxy, my client disconnect in loop..
Does anybody can help me ?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.