diff --git a/src/acl.c b/src/acl.c index ca16f59f..6e778969 100644 --- a/src/acl.c +++ b/src/acl.c @@ -1,3 +1,25 @@ +/* + * acl.c - Manage the ACL (Access Control List) + * + * Copyright (C) 2013 - 2014, Max Lv + * + * This file is part of the shadowsocks-libev. + * + * shadowsocks-libev is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * shadowsocks-libev is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with pdnsd; see the file COPYING. If not, see + * . + */ + #include #include diff --git a/src/acl.h b/src/acl.h index 2b392a3f..04e0982b 100644 --- a/src/acl.h +++ b/src/acl.h @@ -1,3 +1,25 @@ +/* + * acl.h - Define the ACL interface + * + * Copyright (C) 2013 - 2014, Max Lv + * + * This file is part of the shadowsocks-libev. + * + * shadowsocks-libev is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * shadowsocks-libev is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with pdnsd; see the file COPYING. If not, see + * . + */ + #ifndef _ACL_H #define _ACL_H diff --git a/src/cache.c b/src/cache.c index e70e0998..077986f7 100644 --- a/src/cache.c +++ b/src/cache.c @@ -1,3 +1,25 @@ +/* + * cache.c - Manage the connection cache for UDPRELAY + * + * Copyright (C) 2013 - 2014, Max Lv + * + * This file is part of the shadowsocks-libev. + * + * shadowsocks-libev is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * shadowsocks-libev is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with pdnsd; see the file COPYING. If not, see + * . + */ + /* * Original Author: Oliver Lorenz (ol), olli@olorenz.org, https://olorenz.org * License: This is licensed under the same terms as uthash itself diff --git a/src/cache.h b/src/cache.h index b20b8b35..b53469d3 100644 --- a/src/cache.h +++ b/src/cache.h @@ -1,3 +1,25 @@ +/* + * cache.c - Define the cache manager interface + * + * Copyright (C) 2013 - 2014, Max Lv + * + * This file is part of the shadowsocks-libev. + * + * shadowsocks-libev is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * shadowsocks-libev is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with pdnsd; see the file COPYING. If not, see + * . + */ + /* * Original Author: Oliver Lorenz (ol), olli@olorenz.org, https://olorenz.org * License: This is licensed under the same terms as uthash itself diff --git a/src/encrypt.c b/src/encrypt.c index e31c3102..06c2e3b2 100644 --- a/src/encrypt.c +++ b/src/encrypt.c @@ -1,3 +1,25 @@ +/* + * encrypt.c - Manage the global encryptor + * + * Copyright (C) 2013 - 2014, Max Lv + * + * This file is part of the shadowsocks-libev. + * + * shadowsocks-libev is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * shadowsocks-libev is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with pdnsd; see the file COPYING. If not, see + * . + */ + #ifdef HAVE_CONFIG_H #include "config.h" #endif diff --git a/src/encrypt.h b/src/encrypt.h index ae052b32..138dead2 100644 --- a/src/encrypt.h +++ b/src/encrypt.h @@ -1,3 +1,25 @@ +/* + * encrypt.h - Define the enryptor's interface + * + * Copyright (C) 2013 - 2014, Max Lv + * + * This file is part of the shadowsocks-libev. + * + * shadowsocks-libev is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * shadowsocks-libev is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with pdnsd; see the file COPYING. If not, see + * . + */ + #ifndef _ENCRYPT_H #define _ENCRYPT_H diff --git a/src/include.h b/src/include.h index 4f303776..dc218ffe 100644 --- a/src/include.h +++ b/src/include.h @@ -1,3 +1,24 @@ +/* + * include.h - Provide global definitions + * + * Copyright (C) 2013 - 2014, Max Lv + * + * This file is part of the shadowsocks-libev. + * shadowsocks-libev is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * shadowsocks-libev is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with pdnsd; see the file COPYING. If not, see + * . + */ + #ifndef _INCLUDE_H #define _INCLUDE_H @@ -8,7 +29,7 @@ #ifndef TCP_FASTOPEN #define TCP_FASTOPEN 23 #endif - + /* conditional define for MSG_FASTOPEN */ #ifndef MSG_FASTOPEN #define MSG_FASTOPEN 0x20000000 diff --git a/src/jconf.c b/src/jconf.c index d92f7dc8..e94d9263 100644 --- a/src/jconf.c +++ b/src/jconf.c @@ -1,3 +1,24 @@ +/* + * jconf.c - Parse the JSON format config file + * + * Copyright (C) 2013 - 2014, Max Lv + * + * This file is part of the shadowsocks-libev. + * shadowsocks-libev is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * shadowsocks-libev is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with pdnsd; see the file COPYING. If not, see + * . + */ + #include #include #include diff --git a/src/jconf.h b/src/jconf.h index c5663e3e..9ba5796a 100644 --- a/src/jconf.h +++ b/src/jconf.h @@ -1,3 +1,24 @@ +/* + * server.c - Define the config data structure + * + * Copyright (C) 2013 - 2014, Max Lv + * + * This file is part of the shadowsocks-libev. + * shadowsocks-libev is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * shadowsocks-libev is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with pdnsd; see the file COPYING. If not, see + * . + */ + #ifndef _JCONF_H #define _JCONF_H diff --git a/src/json.h b/src/json.h index 61d65aea..6175e12f 100644 --- a/src/json.h +++ b/src/json.h @@ -1,4 +1,3 @@ - /* vim: set et ts=3 sw=3 sts=3 ft=c: * * Copyright (C) 2012, 2013, 2014 James McLaughlin et al. All rights reserved. @@ -120,151 +119,151 @@ typedef struct _json_value } * values; #if defined(__cplusplus) && __cplusplus >= 201103L - decltype(values) begin () const - { - return values; - } - decltype(values) end () const - { - return values + length; - } + decltype(values) begin () const + { + return values; + } + decltype(values) end () const + { + return values + length; + } #endif - } object; + } object; - struct - { - unsigned int length; - struct _json_value ** values; + struct + { + unsigned int length; + struct _json_value ** values; #if defined(__cplusplus) && __cplusplus >= 201103L - decltype(values) begin () const - { - return values; - } - decltype(values) end () const - { - return values + length; - } + decltype(values) begin () const + { + return values; + } + decltype(values) end () const + { + return values + length; + } #endif - } array; + } array; - } u; + } u; - union - { - struct _json_value * next_alloc; - void * object_mem; + union + { + struct _json_value * next_alloc; + void * object_mem; - } _reserved; + } _reserved; - /* Some C++ operator sugar */ + /* Some C++ operator sugar */ #ifdef __cplusplus - public: +public: - inline _json_value () - { - memset (this, 0, sizeof (_json_value)); - } + inline _json_value () + { + memset (this, 0, sizeof (_json_value)); + } - inline const struct _json_value &operator [] (int index) const + inline const struct _json_value &operator [] (int index) const + { + if (type != json_array || index < 0 + || ((unsigned int) index) >= u.array.length) { - if (type != json_array || index < 0 - || ((unsigned int) index) >= u.array.length) - { - return json_value_none; - } - - return *u.array.values [index]; + return json_value_none; } - inline const struct _json_value &operator [] (const char * index) const - { - if (type != json_object) - return json_value_none; - - for (unsigned int i = 0; i < u.object.length; ++ i) - if (!strcmp (u.object.values [i].name, index)) - return *u.object.values [i].value; + return *u.array.values [index]; + } + inline const struct _json_value &operator [] (const char * index) const + { + if (type != json_object) return json_value_none; - } - inline operator const char * () const + for (unsigned int i = 0; i < u.object.length; ++ i) + if (!strcmp (u.object.values [i].name, index)) + return *u.object.values [i].value; + + return json_value_none; + } + + inline operator const char * () const + { + switch (type) { - switch (type) - { - case json_string: - return u.string.ptr; + case json_string: + return u.string.ptr; - default: - return ""; - }; - } + default: + return ""; + }; + } - inline operator json_int_t () const + inline operator json_int_t () const + { + switch (type) { - switch (type) - { - case json_integer: - return u.integer; + case json_integer: + return u.integer; - case json_double: - return (json_int_t) u.dbl; + case json_double: + return (json_int_t) u.dbl; - default: - return 0; - }; - } + default: + return 0; + }; + } - inline operator bool () const - { - if (type != json_boolean) - return false; + inline operator bool () const + { + if (type != json_boolean) + return false; - return u.boolean != 0; - } + return u.boolean != 0; + } - inline operator double () const + inline operator double () const + { + switch (type) { - switch (type) - { - case json_integer: - return (double) u.integer; + case json_integer: + return (double) u.integer; - case json_double: - return u.dbl; + case json_double: + return u.dbl; - default: - return 0; - }; - } + default: + return 0; + }; + } #endif - } json_value; +} json_value; - json_value * json_parse (const json_char * json, - size_t length); +json_value * json_parse (const json_char * json, + size_t length); #define json_error_max 128 - json_value * json_parse_ex (json_settings * settings, - const json_char * json, - size_t length, - char * error); +json_value * json_parse_ex (json_settings * settings, + const json_char * json, + size_t length, + char * error); - void json_value_free (json_value *); +void json_value_free (json_value *); - /* Not usually necessary, unless you used a custom mem_alloc and now want to - * use a custom mem_free. - */ - void json_value_free_ex (json_settings * settings, - json_value *); +/* Not usually necessary, unless you used a custom mem_alloc and now want to + * use a custom mem_free. + */ +void json_value_free_ex (json_settings * settings, + json_value *); #ifdef __cplusplus diff --git a/src/local.c b/src/local.c index c6f98df4..ba259d85 100644 --- a/src/local.c +++ b/src/local.c @@ -1,3 +1,25 @@ +/* + * local.c - Setup a socks5 proxy through remote shadowsocks server + * + * Copyright (C) 2013 - 2014, Max Lv + * + * This file is part of the shadowsocks-libev. + * + * shadowsocks-libev is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * shadowsocks-libev is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with pdnsd; see the file COPYING. If not, see + * . + */ + #include #include #include @@ -411,7 +433,7 @@ static void server_recv_cb (EV_P_ ev_io *w, int revents) } if ((request->atyp == 1 && acl_contains_ip(host)) - || (request->atyp = 3 && acl_contains_domain(host))) + || (request->atyp = 3 && acl_contains_domain(host))) { remote = connect_to_remote(server->listener, host, port); remote->direct = 1; diff --git a/src/local.h b/src/local.h index 9539c833..330a1f66 100644 --- a/src/local.h +++ b/src/local.h @@ -1,3 +1,25 @@ +/* + * local.h - Define the clinet's buffers and callbacks + * + * Copyright (C) 2013 - 2014, Max Lv + * + * This file is part of the shadowsocks-libev. + * + * shadowsocks-libev is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * shadowsocks-libev is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with pdnsd; see the file COPYING. If not, see + * . + */ + #ifndef _LOCAL_H #define _LOCAL_H diff --git a/src/redir.c b/src/redir.c index f2bebdfb..71c028f1 100644 --- a/src/redir.c +++ b/src/redir.c @@ -1,3 +1,26 @@ +/* + * redir.c - Provide a transparent TCP proxy through remote shadowsocks + * server + * + * Copyright (C) 2013 - 2014, Max Lv + * + * This file is part of the shadowsocks-libev. + * + * shadowsocks-libev is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * shadowsocks-libev is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with pdnsd; see the file COPYING. If not, see + * . + */ + #include #include #include diff --git a/src/redir.h b/src/redir.h index 4ec0ae47..6cb75d25 100644 --- a/src/redir.h +++ b/src/redir.h @@ -1,3 +1,25 @@ +/* + * redir.h - Define the redirector's buffers and callbacks + * + * Copyright (C) 2013 - 2014, Max Lv + * + * This file is part of the shadowsocks-libev. + * + * shadowsocks-libev is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * shadowsocks-libev is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with pdnsd; see the file COPYING. If not, see + * . + */ + #ifndef _LOCAL_H #define _LOCAL_H diff --git a/src/server.c b/src/server.c index bc51610c..ec1ebf52 100644 --- a/src/server.c +++ b/src/server.c @@ -1,3 +1,25 @@ +/* + * server.c - Provide shadowsocks service + * + * Copyright (C) 2013 - 2014, Max Lv + * + * This file is part of the shadowsocks-libev. + * + * shadowsocks-libev is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * shadowsocks-libev is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with pdnsd; see the file COPYING. If not, see + * . + */ + #include #include #include diff --git a/src/server.h b/src/server.h index 6e2a52d8..62442118 100644 --- a/src/server.h +++ b/src/server.h @@ -1,3 +1,25 @@ +/* + * server.h - Define shadowsocks server's buffers and callbacks + * + * Copyright (C) 2013 - 2014, Max Lv + * + * This file is part of the shadowsocks-libev. + * + * shadowsocks-libev is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * shadowsocks-libev is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with pdnsd; see the file COPYING. If not, see + * . + */ + #ifndef _SERVER_H #define _SERVER_H diff --git a/src/socks5.h b/src/socks5.h index d666a572..72ec327f 100644 --- a/src/socks5.h +++ b/src/socks5.h @@ -1,3 +1,25 @@ +/* + * socks5.h - Define SOCKS5's header + * + * Copyright (C) 2013, clowwindy + * + * This file is part of the shadowsocks-libev. + * + * shadowsocks-libev is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * shadowsocks-libev is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with pdnsd; see the file COPYING. If not, see + * . + */ + #ifndef _SOCKS5_H #define _SOCKS5_H diff --git a/src/tunnel.c b/src/tunnel.c index f57a4401..88f71296 100644 --- a/src/tunnel.c +++ b/src/tunnel.c @@ -1,3 +1,25 @@ +/* + * tunnel.c - Setup a local port forwarding through remote shadowsocks server + * + * Copyright (C) 2013 - 2014, Max Lv + * + * This file is part of the shadowsocks-libev. + * + * shadowsocks-libev is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * shadowsocks-libev is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with pdnsd; see the file COPYING. If not, see + * . + */ + #include #include #include diff --git a/src/tunnel.h b/src/tunnel.h index 594e52d8..99094059 100644 --- a/src/tunnel.h +++ b/src/tunnel.h @@ -1,5 +1,27 @@ -#ifndef _LOCAL_H -#define _LOCAL_H +/* + * tunnel.h - Define tunnel's buffers and callbacks + * + * Copyright (C) 2013 - 2014, Max Lv + * + * This file is part of the shadowsocks-libev. + * + * shadowsocks-libev is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * shadowsocks-libev is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with pdnsd; see the file COPYING. If not, see + * . + */ + +#ifndef _TUNNEL_H +#define _TUNNEL_H #include #include "encrypt.h" diff --git a/src/udprelay.c b/src/udprelay.c index c0b71373..887819d5 100644 --- a/src/udprelay.c +++ b/src/udprelay.c @@ -1,3 +1,25 @@ +/* + * udprelay.c - Setup UDP relay for both client and server + * + * Copyright (C) 2013 - 2014, Max Lv + * + * This file is part of the shadowsocks-libev. + * + * shadowsocks-libev is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * shadowsocks-libev is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with pdnsd; see the file COPYING. If not, see + * . + */ + #include #include #include diff --git a/src/udprelay.h b/src/udprelay.h index 095a1ab9..62f82cca 100644 --- a/src/udprelay.h +++ b/src/udprelay.h @@ -1,3 +1,25 @@ +/* + * udprelay.h - Define UDP relay's buffers and callbacks + * + * Copyright (C) 2013 - 2014, Max Lv + * + * This file is part of the shadowsocks-libev. + * + * shadowsocks-libev is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * shadowsocks-libev is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with pdnsd; see the file COPYING. If not, see + * . + */ + #ifndef _UDPRELAY_H #define _UDPRELAY_H diff --git a/src/utils.c b/src/utils.c index 5a16e406..3289b4bd 100644 --- a/src/utils.c +++ b/src/utils.c @@ -1,3 +1,25 @@ +/* + * utils.c - Misc utilities + * + * Copyright (C) 2013 - 2014, Max Lv + * + * This file is part of the shadowsocks-libev. + * + * shadowsocks-libev is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * shadowsocks-libev is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with pdnsd; see the file COPYING. If not, see + * . + */ + #include #include #include diff --git a/src/utils.h b/src/utils.h index d9b42662..5ee98892 100644 --- a/src/utils.h +++ b/src/utils.h @@ -1,3 +1,25 @@ +/* + * utils.h - Misc utilities + * + * Copyright (C) 2013 - 2014, Max Lv + * + * This file is part of the shadowsocks-libev. + * + * shadowsocks-libev is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * shadowsocks-libev is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with pdnsd; see the file COPYING. If not, see + * . + */ + #ifndef _UTILS_H #define _UTILS_H diff --git a/src/win32.c b/src/win32.c index 8f50dd91..1aba91bd 100644 --- a/src/win32.c +++ b/src/win32.c @@ -1,3 +1,25 @@ +/* + * win32.c - Win32 port helpers + * + * Copyright (C) 2014, Linus Yang + * + * This file is part of the shadowsocks-libev. + * + * shadowsocks-libev is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * shadowsocks-libev is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with pdnsd; see the file COPYING. If not, see + * . + */ + #include "win32.h" #ifdef setsockopt diff --git a/src/win32.h b/src/win32.h index 91c50f2b..3508b2ff 100644 --- a/src/win32.h +++ b/src/win32.h @@ -1,3 +1,25 @@ +/* + * win32.c - Win32 port helpers + * + * Copyright (C) 2014, Linus Yang + * + * This file is part of the shadowsocks-libev. + * + * shadowsocks-libev is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * shadowsocks-libev is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with pdnsd; see the file COPYING. If not, see + * . + */ + #ifndef _WIN32_H #define _WIN32_H