Skip to content

Instantly share code, notes, and snippets.

View node's full-sized avatar

Chris (Gentle) Y杨 node

View GitHub Profile
@node
node / client2.c
Last active August 27, 2015 02:24 — forked from yongboy/client2.c
gcc -o client2 client2.c -levent; run:./client2 -h 192.168.190.180 -p 8000 -o 192.168.190.150,192.168.190.143,192.168.190.144,192.168.190.145,192.168.190.146,192.168.190.147,192.168.190.148,192.168.190.149,192.168.190.151,192.168.190.152
#include <sys/types.h>
#include <sys/time.h>
#include <sys/queue.h>
#include <stdlib.h>
#include <err.h>
#include <event.h>
#include <evhttp.h>
#include <unistd.h>
#include <stdio.h>
#include <string.h>
server {
listen 80;
server_name ww.centos.bz;
rewrite ^(.*) https://$server_name$1 permanent;
}