Changeset 536


Ignore:
Timestamp:
01/06/10 13:08:22 (2 years ago)
Author:
eagle
Message:
  • separate name for connect log and pid file for OC/GC.
  • mode detection (OC/GC) improved
Location:
trunk
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/ChangeLog

    r535 r536  
    11* version 0.2.2 
     2 - separate name for connect log and pid file for OC/GC. 
     3 - mode detection (OC/GC) improved 
    24 - GarliCat branch merged back into trunk 
    35 - added onioncat-privatehosts.pl to trunk (written by zzz) 
  • trunk/configure

    r535 r536  
    11#! /bin/sh 
    22# Guess values for system-dependent variables and create Makefiles. 
    3 # Generated by GNU Autoconf 2.62 for onioncat 0.2.2.r535. 
     3# Generated by GNU Autoconf 2.62 for onioncat 0.2.2.r536. 
    44# 
    55# Report bugs to <rahra@cypherpunk.at>. 
     
    597597PACKAGE_NAME='onioncat' 
    598598PACKAGE_TARNAME='onioncat' 
    599 PACKAGE_VERSION='0.2.2.r535' 
    600 PACKAGE_STRING='onioncat 0.2.2.r535' 
     599PACKAGE_VERSION='0.2.2.r536' 
     600PACKAGE_STRING='onioncat 0.2.2.r536' 
    601601PACKAGE_BUGREPORT='rahra@cypherpunk.at' 
    602602 
     
    12611261  # This message is too long to be a string in the A/UX 3.1 sh. 
    12621262  cat <<_ACEOF 
    1263 \`configure' configures onioncat 0.2.2.r535 to adapt to many kinds of systems. 
     1263\`configure' configures onioncat 0.2.2.r536 to adapt to many kinds of systems. 
    12641264 
    12651265Usage: $0 [OPTION]... [VAR=VALUE]... 
     
    13311331if test -n "$ac_init_help"; then 
    13321332  case $ac_init_help in 
    1333      short | recursive ) echo "Configuration of onioncat 0.2.2.r535:";; 
     1333     short | recursive ) echo "Configuration of onioncat 0.2.2.r536:";; 
    13341334   esac 
    13351335  cat <<\_ACEOF 
     
    14231423if $ac_init_version; then 
    14241424  cat <<\_ACEOF 
    1425 onioncat configure 0.2.2.r535 
     1425onioncat configure 0.2.2.r536 
    14261426generated by GNU Autoconf 2.62 
    14271427 
     
    14371437running configure, to aid debugging if configure makes a mistake. 
    14381438 
    1439 It was created by onioncat $as_me 0.2.2.r535, which was 
     1439It was created by onioncat $as_me 0.2.2.r536, which was 
    14401440generated by GNU Autoconf 2.62.  Invocation command line was 
    14411441 
     
    20862086# Define the identity of the package. 
    20872087 PACKAGE='onioncat' 
    2088  VERSION='0.2.2.r535' 
     2088 VERSION='0.2.2.r536' 
    20892089 
    20902090 
     
    22372237 
    22382238cat >>confdefs.h <<\_ACEOF 
    2239 #define SVN_REVISION "535" 
     2239#define SVN_REVISION "536" 
    22402240_ACEOF 
    22412241 
     
    52215221# values after options handling. 
    52225222ac_log=" 
    5223 This file was extended by onioncat $as_me 0.2.2.r535, which was 
     5223This file was extended by onioncat $as_me 0.2.2.r536, which was 
    52245224generated by GNU Autoconf 2.62.  Invocation command line was 
    52255225 
     
    52745274cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 
    52755275ac_cs_version="\\ 
    5276 onioncat config.status 0.2.2.r535 
     5276onioncat config.status 0.2.2.r536 
    52775277configured by $0, generated by GNU Autoconf 2.62, 
    52785278  with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" 
  • trunk/src/ocat.c

    r535 r536  
    5151         , CNF(version), s, 
    5252         // option defaults start here 
    53          OCAT_DIR, OCAT_CONNECT_LOG, CNF(create_clog),  
     53         OCAT_DIR, NDESC(clog_file), CNF(create_clog),  
    5454         CNF(daemon), CNF(daemon) ^ 1, 
    5555         CNF(debug_level), NDESC(listen_port), 
     
    276276   int c, runasroot = 0; 
    277277   struct passwd *pwd, pwdm; 
    278    int urlconv = 0; 
     278   int urlconv = 0, mode_detect = 0; 
    279279 
    280280   init_setup(); 
     281   // detect network type by command file name 
     282   // FIXME: this should be not hardcoded in that way 
     283   // FIXME: basename() should better be used instead of strstr() 
     284   if (strstr(argv[0], "gcat")) 
     285   { 
     286      CNF(net_type) = NTYPE_I2P; 
     287      snprintf(def, 100, "127.0.0.1:%d", NDESC(listen_port)); 
     288      post_init_setup(); 
     289      mode_detect = 1; 
     290   } 
    281291 
    282292   while ((c = getopt(argc, argv, "abBCd:f:hrRiIopl:t:T:s:u:4L:P:")) != -1) 
     
    381391      } 
    382392 
    383    // detect network type by command file name 
    384    // FIXME: this should be not hardcoded in that way 
    385    if (!strcmp(argv[0], "gcat") || !strcmp(argv[0], "garlicat")) 
    386       CNF(net_type) = NTYPE_I2P; 
    387  
    388    snprintf(def, 100, "127.0.0.1:%d", NDESC(listen_port)); 
    389    post_init_setup(); 
     393   if (!mode_detect) 
     394   { 
     395      snprintf(def, 100, "127.0.0.1:%d", NDESC(listen_port)); 
     396      post_init_setup(); 
     397   } 
    390398 
    391399   // usage output must be after mode detection (Tor/I2P) 
  • trunk/src/ocat.h

    r535 r536  
    117117#define OCAT_URL "http://www.abenteuerland.at/onioncat/" 
    118118#define OCAT_DIR ".ocat" 
    119 #define OCAT_CONNECT_LOG "connect_log" 
     119//#define OCAT_CONNECT_LOG "connect_log" 
    120120#define PID_FILE "/var/run/ocat.pid" 
    121121#define OCAT_AUTHOR "Bernhard R. Fischer" 
  • trunk/src/ocat_netdesc.c

    r534 r536  
    3131      TOR_OCAT_DEST_PORT, 
    3232      TOR_SOCKS_PORT, 
     33      TOR_OCAT_CONNECT_LOG, 
     34      TOR_PID_FILE, 
    3335   }, 
    3436   { 
     
    4143      I2P_OCAT_DEST_PORT, 
    4244      I2P_SOCKS_PORT, 
     45      I2P_OCAT_CONNECT_LOG, 
     46      I2P_PID_FILE, 
    4347   }, 
    4448}; 
  • trunk/src/ocat_netdesc.h

    r534 r536  
    3737   short vdest_port; 
    3838   short socks_port; 
     39   char *clog_file; 
     40   char *pid_file; 
    3941}; 
    4042 
     
    6870//! SOCKS port of TOR proxy 
    6971#define TOR_SOCKS_PORT 9050 
     72#define TOR_OCAT_CONNECT_LOG "ocat_connect_log" 
     73#define TOR_PID_FILE "/var/run/ocat.pid" 
    7074 
    7175 
     
    8993//! SOCKS port of TOR proxy 
    9094#define I2P_SOCKS_PORT 9051 
     95#define I2P_OCAT_CONNECT_LOG "gcat_connect_log" 
     96#define I2P_PID_FILE "/var/run/gcat.pid" 
    9197 
    9298 
  • trunk/src/ocatlog.c

    r499 r536  
    2323 
    2424#include "ocat.h" 
     25#include "ocat_netdesc.h" 
    2526 
    2627#define TIMESTRLEN 64 
     
    6869 
    6970   strlcat(buf, "/", CBUFLEN); 
    70    strlcat(buf, OCAT_CONNECT_LOG, CBUFLEN); 
     71   strlcat(buf, NDESC(clog_file), CBUFLEN); 
    7172 
    7273   log_debug("opening connect log \"%s\"", buf); 
  • trunk/src/ocatsetup.c

    r535 r536  
    174174   snprintf(&setup_.version[strlen(setup_.version)], VERSION_STRING_LEN - strlen(setup_.version), " -- compiled %s %s", __DATE__, __TIME__); 
    175175#endif 
     176   setup_.pid_file = NDESC(pid_file); 
    176177} 
    177178 
Note: See TracChangeset for help on using the changeset viewer.