Compare commits
68 Commits
master
...
release-0.
Author | SHA1 | Date |
---|---|---|
Roger Dingledine | 7da1ae7adf | |
Roger Dingledine | 0b74f64275 | |
Nick Mathewson | 887bddb7e7 | |
Nick Mathewson | fbfc8e032f | |
Nick Mathewson | c30ac81d40 | |
Nick Mathewson | aea35fbb1b | |
Nick Mathewson | 03c7d9e992 | |
Nick Mathewson | 5eff44ca8e | |
Nick Mathewson | 67357ca9f3 | |
Roger Dingledine | e234c1cd23 | |
Roger Dingledine | abd34f1527 | |
Roger Dingledine | e740ac08c6 | |
Roger Dingledine | 4f699cd24a | |
Roger Dingledine | 484240c4b8 | |
Roger Dingledine | 6bb9bd17d0 | |
Roger Dingledine | 6097b8eefc | |
Roger Dingledine | 031d8fcdab | |
Roger Dingledine | 9f61d8a3b3 | |
Roger Dingledine | 9ac4ceb0d4 | |
Roger Dingledine | 7c29b6996e | |
Roger Dingledine | c55f586e36 | |
Roger Dingledine | 6ef2e30c72 | |
Roger Dingledine | f1c43a1e64 | |
Nick Mathewson | 189ba4c9a9 | |
Nick Mathewson | 4a3ef002e7 | |
Roger Dingledine | 109ba37d54 | |
Roger Dingledine | acc54d32b6 | |
Roger Dingledine | 2bd2c10fcb | |
Roger Dingledine | c783b828ca | |
Roger Dingledine | b36a837f08 | |
Roger Dingledine | 75953f9b60 | |
Roger Dingledine | 1855b4ebfd | |
Roger Dingledine | 62d660b1da | |
Roger Dingledine | feabf2eb6c | |
Roger Dingledine | f10ec55b25 | |
Roger Dingledine | 6168d2e975 | |
Roger Dingledine | f59cad68dc | |
Roger Dingledine | 95cd7f6f67 | |
Roger Dingledine | 026204088a | |
Roger Dingledine | 49cda713f8 | |
Roger Dingledine | a2fe17bae2 | |
Roger Dingledine | 41b60af271 | |
Roger Dingledine | 2cb9ed2cd3 | |
Roger Dingledine | 9be473b82f | |
Roger Dingledine | f90fcaff64 | |
Roger Dingledine | bcd788f33f | |
Roger Dingledine | 4262a36d99 | |
Roger Dingledine | 73a7028a11 | |
Roger Dingledine | 3936267fd9 | |
Roger Dingledine | f181067a09 | |
Roger Dingledine | 6b23a6aff7 | |
Roger Dingledine | 4170a11398 | |
Roger Dingledine | ba8a8ff935 | |
Roger Dingledine | df16e99718 | |
Roger Dingledine | 75bead1246 | |
Roger Dingledine | 924f7bf9a5 | |
Roger Dingledine | 16946d7e36 | |
Roger Dingledine | d05323c802 | |
Roger Dingledine | 076d2a0e11 | |
Roger Dingledine | 05319e4d59 | |
Roger Dingledine | 4c549fec8f | |
Roger Dingledine | a55b44dc00 | |
Roger Dingledine | 9a7db7abaa | |
Roger Dingledine | 32ca2bd0f5 | |
Roger Dingledine | 64d1b8364e | |
Roger Dingledine | 24c334e728 | |
Roger Dingledine | 77f30fb55b | |
Roger Dingledine | ba97ab4eb2 |
|
@ -1,62 +0,0 @@
|
|||
version: 1.0.{build}
|
||||
|
||||
clone_depth: 50
|
||||
|
||||
environment:
|
||||
compiler: mingw
|
||||
|
||||
matrix:
|
||||
- target: i686-w64-mingw32
|
||||
compiler_path: mingw32
|
||||
openssl_path: /c/OpenSSL-Win32
|
||||
- target: x86_64-w64-mingw32
|
||||
compiler_path: mingw64
|
||||
openssl_path: /c/OpenSSL-Win64
|
||||
|
||||
install:
|
||||
- ps: >-
|
||||
Function Execute-Command ($commandPath)
|
||||
{
|
||||
& $commandPath $args 2>&1
|
||||
if ( $LastExitCode -ne 0 ) {
|
||||
$host.SetShouldExit( $LastExitCode )
|
||||
}
|
||||
}
|
||||
Function Execute-Bash ()
|
||||
{
|
||||
Execute-Command 'c:\msys64\usr\bin\bash' '-e' '-c' $args
|
||||
}
|
||||
Execute-Command "C:\msys64\usr\bin\pacman" -Sy --noconfirm openssl-devel openssl libevent-devel libevent mingw-w64-i686-libevent mingw-w64-x86_64-libevent mingw-w64-i686-openssl mingw-w64-x86_64-openssl mingw-w64-i686-zstd mingw-w64-x86_64-zstd
|
||||
|
||||
build_script:
|
||||
- ps: >-
|
||||
if ($env:compiler -eq "mingw") {
|
||||
$oldpath = ${env:Path} -split ';'
|
||||
$buildpath = @("C:\msys64\${env:compiler_path}\bin", "C:\msys64\usr\bin") + $oldpath
|
||||
$env:Path = @($buildpath) -join ';'
|
||||
$env:build = @("${env:APPVEYOR_BUILD_FOLDER}", $env:target) -join '\'
|
||||
Set-Location "${env:APPVEYOR_BUILD_FOLDER}"
|
||||
Execute-Bash 'autoreconf -i'
|
||||
mkdir "${env:build}"
|
||||
Set-Location "${env:build}"
|
||||
Execute-Bash "../configure --prefix=/${env:compiler_path} --build=${env:target} --host=${env:target} --disable-asciidoc --enable-fatal-warnings --with-openssl-dir=${env:openssl_path}"
|
||||
Execute-Bash "V=1 make -j2"
|
||||
Execute-Bash "V=1 make -j2 install"
|
||||
}
|
||||
|
||||
test_script:
|
||||
- ps: >-
|
||||
if ($env:compiler -eq "mingw") {
|
||||
$oldpath = ${env:Path} -split ';'
|
||||
$buildpath = @("C:\msys64\${env:compiler_path}\bin") + $oldpath
|
||||
$env:Path = $buildpath -join ';'
|
||||
Set-Location "${env:build}"
|
||||
Execute-Bash "VERBOSE=1 make -j2 check"
|
||||
}
|
||||
|
||||
on_success:
|
||||
- cmd: C:\Python27\python.exe %APPVEYOR_BUILD_FOLDER%\scripts\test\appveyor-irc-notify.py irc.oftc.net:6697 tor-ci success
|
||||
|
||||
on_failure:
|
||||
- cmd: C:\Python27\python.exe %APPVEYOR_BUILD_FOLDER%\scripts\test\appveyor-irc-notify.py irc.oftc.net:6697 tor-ci failure
|
||||
|
|
@ -3,10 +3,8 @@
|
|||
.#*
|
||||
*~
|
||||
*.swp
|
||||
*.swo
|
||||
# C stuff
|
||||
*.o
|
||||
*.obj
|
||||
# Diff droppings
|
||||
*.orig
|
||||
*.rej
|
||||
|
@ -14,37 +12,23 @@
|
|||
*.gcno
|
||||
*.gcov
|
||||
*.gcda
|
||||
# latex stuff
|
||||
*.aux
|
||||
*.dvi
|
||||
*.blg
|
||||
*.bbl
|
||||
*.log
|
||||
# Autotools stuff
|
||||
.deps
|
||||
.dirstamp
|
||||
*.trs
|
||||
*.log
|
||||
# Calltool stuff
|
||||
.*.graph
|
||||
# Stuff made by our makefiles
|
||||
*.bak
|
||||
# Python droppings
|
||||
*.pyc
|
||||
*.pyo
|
||||
# Cscope
|
||||
cscope.*
|
||||
# OSX junk
|
||||
*.dSYM
|
||||
.DS_Store
|
||||
# updateFallbackDirs.py temp files
|
||||
details-*.json
|
||||
uptime-*.json
|
||||
*.full_url
|
||||
*.last_modified
|
||||
|
||||
# /
|
||||
/Makefile
|
||||
/Makefile.in
|
||||
/aclocal.m4
|
||||
/ar-lib
|
||||
/autom4te.cache
|
||||
/build-stamp
|
||||
/compile
|
||||
/configure
|
||||
/Doxyfile
|
||||
/orconfig.h
|
||||
|
@ -55,13 +39,10 @@ uptime-*.json
|
|||
/config.guess
|
||||
/config.sub
|
||||
/conftest*
|
||||
/micro-revision.*
|
||||
/patch-stamp
|
||||
/stamp-h
|
||||
/stamp-h.in
|
||||
/stamp-h1
|
||||
/TAGS
|
||||
/test-driver
|
||||
/tor.sh
|
||||
/tor.spec
|
||||
/depcomp
|
||||
|
@ -70,19 +51,35 @@ uptime-*.json
|
|||
/mkinstalldirs
|
||||
/Tor*Bundle.dmg
|
||||
/tor-*-win32.exe
|
||||
/coverage_html/
|
||||
/callgraph/
|
||||
|
||||
# /contrib/
|
||||
/contrib/dist/tor.sh
|
||||
/contrib/dist/torctl
|
||||
/contrib/dist/tor.service
|
||||
/contrib/operator-tools/tor.logrotate
|
||||
/contrib/dist/suse/tor.sh
|
||||
/contrib/Makefile
|
||||
/contrib/Makefile.in
|
||||
/contrib/tor.sh
|
||||
/contrib/torctl
|
||||
/contrib/torify
|
||||
/contrib/*.pyc
|
||||
/contrib/*.pyo
|
||||
/contrib/tor.logrotate
|
||||
/contrib/tor.wxs
|
||||
|
||||
# /contrib/osx/
|
||||
/contrib/osx/Makefile
|
||||
/contrib/osx/Makefile.in
|
||||
/contrib/osx/TorBundleDesc.plist
|
||||
/contrib/osx/TorBundleInfo.plist
|
||||
/contrib/osx/TorDesc.plist
|
||||
/contrib/osx/TorInfo.plist
|
||||
/contrib/osx/TorStartupDesc.plist
|
||||
/contrib/osx/net.freehaven.tor.plist
|
||||
|
||||
# /contrib/suse/
|
||||
/contrib/suse/tor.sh
|
||||
/contrib/suse/Makefile.in
|
||||
/contrib/suse/Makefile
|
||||
|
||||
# /debian/
|
||||
/debian/files
|
||||
/debian/micro-revision.i
|
||||
/debian/patched
|
||||
/debian/tor
|
||||
/debian/tor.postinst.debhelper
|
||||
|
@ -93,60 +90,26 @@ uptime-*.json
|
|||
# /doc/
|
||||
/doc/Makefile
|
||||
/doc/Makefile.in
|
||||
/doc/doxygen
|
||||
/doc/tor.1
|
||||
/doc/tor.1.in
|
||||
/doc/tor.html
|
||||
/doc/tor.html.in
|
||||
/doc/tor.1.xml
|
||||
/doc/tor-gencert.1
|
||||
/doc/tor-gencert.1.in
|
||||
/doc/tor-gencert.html
|
||||
/doc/tor-gencert.html.in
|
||||
/doc/tor-gencert.1.xml
|
||||
/doc/tor-resolve.1
|
||||
/doc/tor-resolve.1.in
|
||||
/doc/tor-resolve.html
|
||||
/doc/tor-resolve.html.in
|
||||
/doc/tor-resolve.1.xml
|
||||
/doc/torify.1
|
||||
/doc/torify.1.in
|
||||
/doc/torify.html
|
||||
/doc/torify.html.in
|
||||
/doc/torify.1.xml
|
||||
/doc/doxygen
|
||||
|
||||
# /doc/design-paper/
|
||||
/doc/design-paper/Makefile
|
||||
/doc/design-paper/Makefile.in
|
||||
|
||||
# /doc/spec/
|
||||
/doc/spec/Makefile
|
||||
/doc/spec/Makefile.in
|
||||
|
||||
# /scripts
|
||||
/scripts/maint/checkOptionDocs.pl
|
||||
/scripts/maint/updateVersions.pl
|
||||
|
||||
# /src/
|
||||
/src/Makefile
|
||||
/src/Makefile.in
|
||||
|
||||
# /src/trace
|
||||
/src/trace/libor-trace.a
|
||||
|
||||
# /src/common/
|
||||
/src/common/Makefile
|
||||
/src/common/Makefile.in
|
||||
/src/common/libor.a
|
||||
/src/common/libor-testing.a
|
||||
/src/common/libor.lib
|
||||
/src/common/libor-ctime.a
|
||||
/src/common/libor-ctime-testing.a
|
||||
/src/common/libor-ctime.lib
|
||||
/src/common/libor-crypto.a
|
||||
/src/common/libor-crypto-testing.a
|
||||
/src/common/libor-crypto.lib
|
||||
/src/common/libor-event.a
|
||||
/src/common/libor-event-testing.a
|
||||
/src/common/libor-event.lib
|
||||
/src/common/libcurve25519_donna.a
|
||||
/src/common/libcurve25519_donna.lib
|
||||
|
||||
# /src/config/
|
||||
/src/config/Makefile
|
||||
|
@ -154,82 +117,21 @@ uptime-*.json
|
|||
/src/config/sample-server-torrc
|
||||
/src/config/torrc
|
||||
/src/config/torrc.sample
|
||||
/src/config/torrc.minimal
|
||||
|
||||
# /src/ext/
|
||||
/src/ext/ed25519/ref10/libed25519_ref10.a
|
||||
/src/ext/ed25519/ref10/libed25519_ref10.lib
|
||||
/src/ext/ed25519/donna/libed25519_donna.a
|
||||
/src/ext/ed25519/donna/libed25519_donna.lib
|
||||
/src/ext/keccak-tiny/libkeccak-tiny.a
|
||||
/src/ext/keccak-tiny/libkeccak-tiny.lib
|
||||
|
||||
# /src/or/
|
||||
/src/or/Makefile
|
||||
/src/or/Makefile.in
|
||||
/src/or/micro-revision.*
|
||||
/src/or/tor
|
||||
/src/or/tor.exe
|
||||
/src/or/tor-cov
|
||||
/src/or/tor-cov.exe
|
||||
/src/or/libtor.a
|
||||
/src/or/libtor-testing.a
|
||||
/src/or/libtor.lib
|
||||
|
||||
# /src/rust
|
||||
/src/rust/.cargo/config
|
||||
/src/rust/.cargo/registry
|
||||
/src/rust/target
|
||||
/src/rust/registry
|
||||
|
||||
# /src/test
|
||||
/src/test/Makefile
|
||||
/src/test/Makefile.in
|
||||
/src/test/bench
|
||||
/src/test/bench.exe
|
||||
/src/test/test
|
||||
/src/test/test-slow
|
||||
/src/test/test-bt-cl
|
||||
/src/test/test-child
|
||||
/src/test/test-memwipe
|
||||
/src/test/test-ntor-cl
|
||||
/src/test/test-hs-ntor-cl
|
||||
/src/test/test-switch-id
|
||||
/src/test/test-timers
|
||||
/src/test/test_workqueue
|
||||
/src/test/test.exe
|
||||
/src/test/test-slow.exe
|
||||
/src/test/test-bt-cl.exe
|
||||
/src/test/test-child.exe
|
||||
/src/test/test-ntor-cl.exe
|
||||
/src/test/test-hs-ntor-cl.exe
|
||||
/src/test/test-memwipe.exe
|
||||
/src/test/test-switch-id.exe
|
||||
/src/test/test-timers.exe
|
||||
/src/test/test_workqueue.exe
|
||||
|
||||
# /src/test/fuzz
|
||||
/src/test/fuzz/fuzz-*
|
||||
/src/test/fuzz/lf-fuzz-*
|
||||
/src/or/test
|
||||
|
||||
# /src/tools/
|
||||
/src/tools/libtorrunner.a
|
||||
/src/tools/tor-checkkey
|
||||
/src/tools/tor-resolve
|
||||
/src/tools/tor-cov-resolve
|
||||
/src/tools/tor-gencert
|
||||
/src/tools/tor-cov-gencert
|
||||
/src/tools/tor-checkkey.exe
|
||||
/src/tools/tor-resolve.exe
|
||||
/src/tools/tor-cov-resolve.exe
|
||||
/src/tools/tor-gencert.exe
|
||||
/src/tools/tor-cov-gencert.exe
|
||||
/src/tools/Makefile
|
||||
/src/tools/Makefile.in
|
||||
|
||||
# /src/trunnel/
|
||||
/src/trunnel/libor-trunnel-testing.a
|
||||
/src/trunnel/libor-trunnel.a
|
||||
|
||||
# /src/win32/
|
||||
/src/win32/Makefile
|
||||
/src/win32/Makefile.in
|
||||
|
|
|
@ -1,45 +0,0 @@
|
|||
before_script:
|
||||
- apt-get update -qq
|
||||
- apt-get upgrade -qy
|
||||
|
||||
build:
|
||||
script:
|
||||
- apt-get install -qy --fix-missing automake build-essential
|
||||
libevent-dev libssl-dev zlib1g-dev
|
||||
libseccomp-dev liblzma-dev libscrypt-dev
|
||||
- ./autogen.sh
|
||||
- ./configure --disable-asciidoc --enable-fatal-warnings
|
||||
--disable-silent-rules
|
||||
- make check || (e=$?; cat test-suite.log; exit $e)
|
||||
- make install
|
||||
|
||||
update:
|
||||
only:
|
||||
- schedules
|
||||
script:
|
||||
- "apt-get install -y --fix-missing git openssh-client"
|
||||
|
||||
# Run ssh-agent (inside the build environment)
|
||||
- eval $(ssh-agent -s)
|
||||
|
||||
# Add the SSH key stored in SSH_PRIVATE_KEY variable to the agent store
|
||||
- ssh-add <(echo "$DEPLOY_KEY")
|
||||
|
||||
# For Docker builds disable host key checking. Be aware that by adding that
|
||||
# you are susceptible to man-in-the-middle attacks.
|
||||
# WARNING: Use this only with the Docker executor, if you use it with shell
|
||||
# you will overwrite your user's SSH config.
|
||||
- mkdir -p ~/.ssh
|
||||
- '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config'
|
||||
# In order to properly check the server's host key, assuming you created the
|
||||
# SSH_SERVER_HOSTKEYS variable previously, uncomment the following two lines
|
||||
# instead.
|
||||
- mkdir -p ~/.ssh
|
||||
- '[[ -f /.dockerenv ]] && echo "$SSH_SERVER_HOSTKEYS" > ~/.ssh/known_hosts'
|
||||
- echo "merging from torgit"
|
||||
- git config --global user.email "labadmin@oniongit.eu"
|
||||
- git config --global user.name "gitadmin"
|
||||
- "mkdir tor"
|
||||
- "cd tor"
|
||||
- git clone --bare https://git.torproject.org/tor.git
|
||||
- git push --mirror git@oniongit.eu:network/tor.git
|
|
@ -1,3 +0,0 @@
|
|||
[submodule "src/ext/rust"]
|
||||
path = src/ext/rust
|
||||
url = https://git.torproject.org/tor-rust-dependencies
|
169
.travis.yml
169
.travis.yml
|
@ -1,169 +0,0 @@
|
|||
language: c
|
||||
|
||||
## Comment out the compiler list for now to allow an explicit build
|
||||
## matrix.
|
||||
# compiler:
|
||||
# - gcc
|
||||
# - clang
|
||||
|
||||
notifications:
|
||||
irc:
|
||||
channels:
|
||||
- "irc.oftc.net#tor-ci"
|
||||
template:
|
||||
- "%{repository} %{branch} %{commit} - %{author}: %{commit_subject}"
|
||||
- "Build #%{build_number} %{result}. Details: %{build_url}"
|
||||
on_success: change
|
||||
on_failure: change
|
||||
email:
|
||||
on_success: never
|
||||
on_failure: change
|
||||
|
||||
os:
|
||||
- linux
|
||||
## Uncomment the following line to also run the entire build matrix on OSX.
|
||||
## This will make your CI builds take roughly ten times longer to finish.
|
||||
# - osx
|
||||
|
||||
## Use the Ubuntu Trusty images.
|
||||
dist: trusty
|
||||
|
||||
## We don't need sudo. (The "apt:" stanza after this allows us to not need sudo;
|
||||
## otherwise, we would need it for getting dependencies.)
|
||||
##
|
||||
## We override this in the explicit build matrix to work around a
|
||||
## Travis CI environment regression
|
||||
## https://github.com/travis-ci/travis-ci/issues/9033
|
||||
sudo: false
|
||||
|
||||
## (Linux only) Download our dependencies
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
## Required dependencies
|
||||
- libevent-dev
|
||||
- libseccomp2
|
||||
- zlib1g-dev
|
||||
## Optional dependencies
|
||||
- liblzma-dev
|
||||
- libscrypt-dev
|
||||
## zstd doesn't exist in Ubuntu Trusty
|
||||
#- libzstd
|
||||
|
||||
## The build matrix in the following two stanzas expands into four builds (per OS):
|
||||
##
|
||||
## * with GCC, with Rust
|
||||
## * with GCC, without Rust
|
||||
## * with Clang, with Rust
|
||||
## * with Clang, without Rust
|
||||
env:
|
||||
global:
|
||||
## The Travis CI environment allows us two cores, so let's use both.
|
||||
- MAKEFLAGS="-j 2"
|
||||
matrix:
|
||||
## Leave at least one entry here or Travis seems to generate a
|
||||
## matrix entry with empty matrix environment variables. Leaving
|
||||
## more than one entry causes unwanted matrix entries with
|
||||
## unspecified compilers.
|
||||
- RUST_OPTIONS="--enable-rust --enable-cargo-online-mode"
|
||||
# - RUST_OPTIONS="--enable-rust" TOR_RUST_DEPENDENCIES=true
|
||||
# - RUST_OPTIONS=""
|
||||
|
||||
matrix:
|
||||
## Uncomment to allow the build to report success (with non-required
|
||||
## sub-builds continuing to run) if all required sub-builds have
|
||||
## succeeded. This is somewhat buggy currently: it can cause
|
||||
## duplicate notifications and prematurely report success if a
|
||||
## single sub-build has succeeded. See
|
||||
## https://github.com/travis-ci/travis-ci/issues/1696
|
||||
# fast_finish: true
|
||||
|
||||
## Uncomment the appropriate lines below to allow the build to
|
||||
## report success even if some less-critical sub-builds fail and it
|
||||
## seems likely to take a while for someone to fix it. Currently
|
||||
## Travis CI doesn't distinguish "all builds succeeded" from "some
|
||||
## non-required sub-builds failed" except on the individual build's
|
||||
## page, which makes it somewhat annoying to detect from the
|
||||
## branches and build history pages. See
|
||||
## https://github.com/travis-ci/travis-ci/issues/8716
|
||||
allow_failures:
|
||||
# - env: RUST_OPTIONS="--enable-rust" TOR_RUST_DEPENDENCIES=true
|
||||
# - env: RUST_OPTIONS="--enable-rust --enable-cargo-online-mode
|
||||
# - compiler: clang
|
||||
|
||||
## Create explicit matrix entries to work around a Travis CI
|
||||
## environment issue. Missing keys inherit from the first list
|
||||
## entry under that key outside the "include" clause.
|
||||
include:
|
||||
- compiler: gcc
|
||||
- compiler: gcc
|
||||
env: RUST_OPTIONS="--enable-rust" TOR_RUST_DEPENDENCIES=true
|
||||
- compiler: gcc
|
||||
env: RUST_OPTIONS=""
|
||||
- compiler: gcc
|
||||
env: COVERAGE_OPTIONS="--enable-coverage"
|
||||
- compiler: gcc
|
||||
env: DISTCHECK="yes" RUST_OPTIONS=""
|
||||
- compiler: gcc
|
||||
env: DISTCHECK="yes" RUST_OPTIONS="--enable-rust --enable-cargo-online-mode"
|
||||
- compiler: gcc
|
||||
env: MODULES_OPTIONS="--disable-module-dirauth"
|
||||
## The "sudo: required" forces non-containerized builds, working
|
||||
## around a Travis CI environment issue: clang LeakAnalyzer fails
|
||||
## because it requires ptrace and the containerized environment no
|
||||
## longer allows ptrace.
|
||||
- compiler: clang
|
||||
sudo: required
|
||||
- compiler: clang
|
||||
sudo: required
|
||||
env: RUST_OPTIONS="--enable-rust" TOR_RUST_DEPENDENCIES=true
|
||||
- compiler: clang
|
||||
sudo: required
|
||||
env: RUST_OPTIONS=""
|
||||
- compiler: clang
|
||||
sudo: required
|
||||
env: MODULES_OPTIONS="--disable-module-dirauth"
|
||||
|
||||
before_install:
|
||||
## If we're on OSX, homebrew usually needs to updated first
|
||||
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update ; fi
|
||||
## Download rustup
|
||||
- if [[ "$RUST_OPTIONS" != "" ]]; then curl -Ssf -o rustup.sh https://sh.rustup.rs; fi
|
||||
- if [[ "$COVERAGE_OPTIONS" != "" ]]; then pip install --user cpp-coveralls; fi
|
||||
|
||||
install:
|
||||
## If we're on OSX use brew to install required dependencies (for Linux, see the "apt:" section above)
|
||||
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then { brew outdated openssl || brew upgrade openssl; }; fi
|
||||
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then { brew outdated libevent || brew upgrade libevent; }; fi
|
||||
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then { brew outdated pkg-config || brew upgrade pkg-config; }; fi
|
||||
## If we're on OSX also install the optional dependencies
|
||||
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then { brew outdated xz || brew upgrade xz; }; fi
|
||||
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then { brew outdated libscrypt || brew upgrade libscrypt; }; fi
|
||||
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then { brew outdated zstd || brew upgrade zstd; }; fi
|
||||
## Install the stable channels of rustc and cargo and setup our toolchain environment
|
||||
- if [[ "$RUST_OPTIONS" != "" ]]; then sh rustup.sh -y --default-toolchain stable; fi
|
||||
- if [[ "$RUST_OPTIONS" != "" ]]; then source $HOME/.cargo/env; fi
|
||||
## Get some info about rustc and cargo
|
||||
- if [[ "$RUST_OPTIONS" != "" ]]; then which rustc; fi
|
||||
- if [[ "$RUST_OPTIONS" != "" ]]; then which cargo; fi
|
||||
- if [[ "$RUST_OPTIONS" != "" ]]; then rustc --version; fi
|
||||
- if [[ "$RUST_OPTIONS" != "" ]]; then cargo --version; fi
|
||||
## If we're testing rust builds in offline-mode, then set up our vendored dependencies
|
||||
- if [[ "$TOR_RUST_DEPENDENCIES" == "true" ]]; then export TOR_RUST_DEPENDENCIES=$PWD/src/ext/rust/crates; fi
|
||||
|
||||
script:
|
||||
- ./autogen.sh
|
||||
- ./configure $RUST_OPTIONS $COVERAGE_OPTIONS $MODULES_OPTIONS --disable-asciidoc --enable-fatal-warnings --disable-silent-rules --enable-fragile-hardening
|
||||
## We run `make check` because that's what https://jenkins.torproject.org does.
|
||||
- if [[ "$DISTCHECK" == "" ]]; then make check; fi
|
||||
- if [[ "$DISTCHECK" != "" ]]; then make distcheck DISTCHECK_CONFIGURE_FLAGS="$RUST_OPTIONS $COVERAGE_OPTIONS --disable-asciidoc --enable-fatal-warnings --disable-silent-rules --enable-fragile-hardening"; fi
|
||||
|
||||
after_failure:
|
||||
## `make check` will leave a log file with more details of test failures.
|
||||
- if [[ "$DISTCHECK" == "" ]]; then cat test-suite.log; fi
|
||||
## `make distcheck` puts it somewhere different.
|
||||
- if [[ "$DISTCHECK" != "" ]]; then make show-distdir-testlog; fi
|
||||
|
||||
after_success:
|
||||
## If this build was one that produced coverage, upload it.
|
||||
- if [[ "$COVERAGE_OPTIONS" != "" ]]; then coveralls -b . --exclude src/test --exclude src/trunnel --gcov-options '\-p'; fi
|
|
@ -0,0 +1,41 @@
|
|||
This file lists the authors for Tor,
|
||||
a free software project to provide anonymity on the Internet.
|
||||
|
||||
For more information about Tor, see https://www.torproject.org/.
|
||||
|
||||
If you got this file as a part of a larger bundle,
|
||||
there are probably other authors that you should be aware of.
|
||||
|
||||
Main authors:
|
||||
-------------
|
||||
|
||||
Roger Dingledine <arma@freehaven.net> overhauled all of the code, did
|
||||
a bunch of new design work, etc.
|
||||
|
||||
Nick Mathewson <nickm@freehaven.net> wrote lots of stuff too, in
|
||||
particular the router and descriptor parsing, and the crypto and tls
|
||||
wrappers.
|
||||
|
||||
Matej Pfajfar <badbytes@freehaven.net> wrote the first version of the code
|
||||
(called OR) in 2001-2002.
|
||||
|
||||
Contributors:
|
||||
-------------
|
||||
|
||||
John Bashinski <jbash@velvet.com> contributed the initial rpm spec file.
|
||||
|
||||
Christian Grothoff <grothoff@cs.purdue.edu> contributed better daemonizing
|
||||
behavior.
|
||||
|
||||
Steven Hazel <sah@thalassocracy.org> made 'make install' do the right
|
||||
thing.
|
||||
|
||||
Jason Holt <jason@lunkwill.org> contributed patches to the instructions
|
||||
and the man page.
|
||||
|
||||
Peter Palfrader <peter@palfrader.org> maintains everything that's
|
||||
debian-specific, and has written other useful features.
|
||||
|
||||
Aaron Turner <aturner@netscreen.com> contributed the first version of
|
||||
the tor.sh initscripts shell script.
|
||||
|
39
CONTRIBUTING
39
CONTRIBUTING
|
@ -1,39 +0,0 @@
|
|||
Contributing to Tor
|
||||
-------------------
|
||||
|
||||
### Getting started
|
||||
|
||||
Welcome!
|
||||
|
||||
We have a bunch of documentation about how to develop Tor in the
|
||||
doc/HACKING/ directory. We recommend that you start with
|
||||
doc/HACKING/README.1st.md , and then go from there. It will tell
|
||||
you how to find your way around the source code, how to get
|
||||
involved with the Tor community, how to write patches, and much
|
||||
more!
|
||||
|
||||
You don't have to be a C developer to help with Tor: have a look
|
||||
at https://www.torproject.org/getinvolved/volunteer !
|
||||
|
||||
The Tor Project is committed to fostering a inclusive community
|
||||
where people feel safe to engage, share their points of view, and
|
||||
participate. For the latest version of our Code of Conduct, please
|
||||
see
|
||||
|
||||
https://gitweb.torproject.org/community/policies.git/plain/code_of_conduct.txt
|
||||
|
||||
|
||||
|
||||
### License issues
|
||||
|
||||
Tor is distributed under the license terms in the LICENSE -- in
|
||||
brief, the "3-clause BSD license". If you send us code to
|
||||
distribute with Tor, it needs to be code that we can distribute
|
||||
under those terms. Please don't send us patches unless you agree
|
||||
to allow this.
|
||||
|
||||
Some compatible licenses include:
|
||||
|
||||
- 3-clause BSD
|
||||
- 2-clause BSD
|
||||
- CC0 Public Domain Dedication
|
322
Doxyfile.in
322
Doxyfile.in
|
@ -1,4 +1,5 @@
|
|||
# Doxyfile 1.5.6
|
||||
# $Id$
|
||||
# Doxyfile 1.5.1
|
||||
|
||||
# This file describes the settings to be used by the documentation system
|
||||
# doxygen (www.doxygen.org) for a project
|
||||
|
@ -14,14 +15,6 @@
|
|||
# Project related configuration options
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# This tag specifies the encoding used for all characters in the config file
|
||||
# that follow. The default is UTF-8 which is also the encoding used for all
|
||||
# text before the first occurrence of this tag. Doxygen uses libiconv (or the
|
||||
# iconv built into libc) for the transcoding. See
|
||||
# http://www.gnu.org/software/libiconv for the list of possible encodings.
|
||||
|
||||
DOXYFILE_ENCODING = UTF-8
|
||||
|
||||
# The PROJECT_NAME tag is a single word (or a sequence of words surrounded
|
||||
# by quotes) that should identify the project.
|
||||
|
||||
|
@ -38,7 +31,7 @@ PROJECT_NUMBER = @VERSION@
|
|||
# If a relative path is entered, it will be relative to the location
|
||||
# where doxygen was started. If left blank the current directory will be used.
|
||||
|
||||
OUTPUT_DIRECTORY = @top_builddir@/doc/doxygen
|
||||
OUTPUT_DIRECTORY = ./doc/doxygen
|
||||
|
||||
# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create
|
||||
# 4096 sub-directories (in 2 levels) under the output directory of each output
|
||||
|
@ -54,14 +47,23 @@ CREATE_SUBDIRS = NO
|
|||
# information to generate all constant output in the proper language.
|
||||
# The default language is English, other supported languages are:
|
||||
# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional,
|
||||
# Croatian, Czech, Danish, Dutch, Farsi, Finnish, French, German, Greek,
|
||||
# Hungarian, Italian, Japanese, Japanese-en (Japanese with English messages),
|
||||
# Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian, Polish,
|
||||
# Portuguese, Romanian, Russian, Serbian, Slovak, Slovene, Spanish, Swedish,
|
||||
# and Ukrainian.
|
||||
# Croatian, Czech, Danish, Dutch, Finnish, French, German, Greek, Hungarian,
|
||||
# Italian, Japanese, Japanese-en (Japanese with English messages), Korean,
|
||||
# Korean-en, Lithuanian, Norwegian, Polish, Portuguese, Romanian, Russian,
|
||||
# Serbian, Slovak, Slovene, Spanish, Swedish, and Ukrainian.
|
||||
|
||||
OUTPUT_LANGUAGE = English
|
||||
|
||||
# This tag can be used to specify the encoding used in the generated output.
|
||||
# The encoding is not always determined by the language that is chosen,
|
||||
# but also whether or not the output is meant for Windows or non-Windows users.
|
||||
# In case there is a difference, setting the USE_WINDOWS_ENCODING tag to YES
|
||||
# forces the Windows encoding (this is the default for the Windows binary),
|
||||
# whereas setting the tag to NO uses a Unix-style encoding (the default for
|
||||
# all platforms other than Windows).
|
||||
|
||||
USE_WINDOWS_ENCODING = NO
|
||||
|
||||
# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will
|
||||
# include brief member descriptions after the members that are listed in
|
||||
# the file and class documentation (similar to JavaDoc).
|
||||
|
@ -134,19 +136,11 @@ SHORT_NAMES = NO
|
|||
# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen
|
||||
# will interpret the first line (until the first dot) of a JavaDoc-style
|
||||
# comment as the brief description. If set to NO, the JavaDoc
|
||||
# comments will behave just like regular Qt-style comments
|
||||
# (thus requiring an explicit @brief command for a brief description.)
|
||||
# comments will behave just like the Qt-style comments (thus requiring an
|
||||
# explicit @brief command for a brief description.
|
||||
|
||||
JAVADOC_AUTOBRIEF = NO
|
||||
|
||||
# If the QT_AUTOBRIEF tag is set to YES then Doxygen will
|
||||
# interpret the first line (until the first dot) of a Qt-style
|
||||
# comment as the brief description. If set to NO, the comments
|
||||
# will behave just like regular Qt-style comments (thus requiring
|
||||
# an explicit \brief command for a brief description.)
|
||||
|
||||
QT_AUTOBRIEF = NO
|
||||
|
||||
# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen
|
||||
# treat a multi-line C++ special comment block (i.e. a block of //! or ///
|
||||
# comments) as a brief description. This used to be the default behaviour.
|
||||
|
@ -160,7 +154,7 @@ MULTILINE_CPP_IS_BRIEF = NO
|
|||
# If set to NO, the detailed description appears after the member
|
||||
# documentation.
|
||||
|
||||
# DETAILS_AT_TOP = NO
|
||||
DETAILS_AT_TOP = NO
|
||||
|
||||
# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented
|
||||
# member inherits the documentation from any documented member that it
|
||||
|
@ -196,26 +190,14 @@ ALIASES =
|
|||
OPTIMIZE_OUTPUT_FOR_C = YES
|
||||
|
||||
# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java
|
||||
# sources only. Doxygen will then generate output that is more tailored for
|
||||
# Java. For instance, namespaces will be presented as packages, qualified
|
||||
# scopes will look different, etc.
|
||||
# sources only. Doxygen will then generate output that is more tailored for Java.
|
||||
# For instance, namespaces will be presented as packages, qualified scopes
|
||||
# will look different, etc.
|
||||
|
||||
OPTIMIZE_OUTPUT_JAVA = NO
|
||||
|
||||
# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran
|
||||
# sources only. Doxygen will then generate output that is more tailored for
|
||||
# Fortran.
|
||||
|
||||
OPTIMIZE_FOR_FORTRAN = NO
|
||||
|
||||
# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL
|
||||
# sources. Doxygen will then generate output that is tailored for
|
||||
# VHDL.
|
||||
|
||||
OPTIMIZE_OUTPUT_VHDL = NO
|
||||
|
||||
# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want
|
||||
# to include (a tag file for) the STL sources as input, then you should
|
||||
# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want to
|
||||
# include (a tag file for) the STL sources as input, then you should
|
||||
# set this tag to YES in order to let doxygen match functions declarations and
|
||||
# definitions whose arguments contain STL classes (e.g. func(std::string); v.s.
|
||||
# func(std::string) {}). This also make the inheritance and collaboration
|
||||
|
@ -223,26 +205,6 @@ OPTIMIZE_OUTPUT_VHDL = NO
|
|||
|
||||
BUILTIN_STL_SUPPORT = NO
|
||||
|
||||
# If you use Microsoft's C++/CLI language, you should set this option to YES to
|
||||
# enable parsing support.
|
||||
|
||||
CPP_CLI_SUPPORT = NO
|
||||
|
||||
# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only.
|
||||
# Doxygen will parse them like normal C++ but will assume all classes use public
|
||||
# instead of private inheritance when no explicit protection keyword is present.
|
||||
|
||||
SIP_SUPPORT = NO
|
||||
|
||||
# For Microsoft's IDL there are propget and propput attributes to indicate getter
|
||||
# and setter methods for a property. Setting this option to YES (the default)
|
||||
# will make doxygen to replace the get and set methods by a property in the
|
||||
# documentation. This will only work if the methods are indeed getting or
|
||||
# setting a simple type. If this is not the case, or you want to show the
|
||||
# methods anyway, you should set this option to NO.
|
||||
|
||||
IDL_PROPERTY_SUPPORT = NO
|
||||
|
||||
# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
|
||||
# tag is set to YES, then doxygen will reuse the documentation of the first
|
||||
# member in the group (if any) for the other members of the group. By default
|
||||
|
@ -258,16 +220,6 @@ DISTRIBUTE_GROUP_DOC = NO
|
|||
|
||||
SUBGROUPING = YES
|
||||
|
||||
# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum
|
||||
# is documented as struct, union, or enum with the name of the typedef. So
|
||||
# typedef struct TypeS {} TypeT, will appear in the documentation as a struct
|
||||
# with name TypeT. When disabled the typedef will appear as a member of a file,
|
||||
# namespace, or class. And the struct will be named TypeS. This can typically
|
||||
# be useful for C code in case the coding convention dictates that all compound
|
||||
# types are typedef'ed and only the typedef is referenced, never the tag name.
|
||||
|
||||
TYPEDEF_HIDES_STRUCT = NO
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Build related configuration options
|
||||
#---------------------------------------------------------------------------
|
||||
|
@ -302,14 +254,6 @@ EXTRACT_LOCAL_CLASSES = YES
|
|||
|
||||
EXTRACT_LOCAL_METHODS = NO
|
||||
|
||||
# If this flag is set to YES, the members of anonymous namespaces will be
|
||||
# extracted and appear in the documentation as a namespace called
|
||||
# 'anonymous_namespace{file}', where file will be replaced with the base
|
||||
# name of the file that contains the anonymous namespace. By default
|
||||
# anonymous namespace are hidden.
|
||||
|
||||
EXTRACT_ANON_NSPACES = NO
|
||||
|
||||
# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all
|
||||
# undocumented members of documented classes, files or namespaces.
|
||||
# If set to NO (the default) these members will be included in the
|
||||
|
@ -385,12 +329,6 @@ SORT_MEMBER_DOCS = YES
|
|||
|
||||
SORT_BRIEF_DOCS = NO
|
||||
|
||||
# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the
|
||||
# hierarchy of group names into alphabetical order. If set to NO (the default)
|
||||
# the group names will appear in their defined order.
|
||||
|
||||
SORT_GROUP_NAMES = NO
|
||||
|
||||
# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be
|
||||
# sorted by fully-qualified names, including namespaces. If set to
|
||||
# NO (the default), the class list will be sorted only by class name,
|
||||
|
@ -446,21 +384,15 @@ MAX_INITIALIZER_LINES = 30
|
|||
|
||||
SHOW_USED_FILES = YES
|
||||
|
||||
# Set the SHOW_FILES tag to NO to disable the generation of the Files page.
|
||||
# This will remove the Files entry from the Quick Index and from the
|
||||
# Folder Tree View (if specified). The default is YES.
|
||||
# If the sources in your project are distributed over multiple directories
|
||||
# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy
|
||||
# in the documentation. The default is NO.
|
||||
|
||||
SHOW_FILES = YES
|
||||
|
||||
# Set the SHOW_NAMESPACES tag to NO to disable the generation of the
|
||||
# Namespaces page. This will remove the Namespaces entry from the Quick Index
|
||||
# and from the Folder Tree View (if specified). The default is YES.
|
||||
|
||||
SHOW_NAMESPACES = YES
|
||||
SHOW_DIRECTORIES = NO
|
||||
|
||||
# The FILE_VERSION_FILTER tag can be used to specify a program or script that
|
||||
# doxygen should invoke to get the current version for each file (typically from
|
||||
# the version control system). Doxygen will invoke the program by executing (via
|
||||
# doxygen should invoke to get the current version for each file (typically from the
|
||||
# version control system). Doxygen will invoke the program by executing (via
|
||||
# popen()) the command <command> <input-file>, where <command> is the value of
|
||||
# the FILE_VERSION_FILTER tag, and <input-file> is the name of an input file
|
||||
# provided by doxygen. Whatever the program writes to standard output
|
||||
|
@ -528,23 +460,15 @@ WARN_LOGFILE =
|
|||
# directories like "/usr/src/myproject". Separate the files or directories
|
||||
# with spaces.
|
||||
|
||||
INPUT = @top_srcdir@/src/common \
|
||||
@top_srcdir@/src/or
|
||||
|
||||
# This tag can be used to specify the character encoding of the source files
|
||||
# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is
|
||||
# also the default input encoding. Doxygen uses libiconv (or the iconv built
|
||||
# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for
|
||||
# the list of possible encodings.
|
||||
|
||||
INPUT_ENCODING = UTF-8
|
||||
INPUT = src/common \
|
||||
src/or
|
||||
|
||||
# If the value of the INPUT tag contains directories, you can use the
|
||||
# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
|
||||
# and *.h) to filter out the source-files in the directories. If left
|
||||
# blank the following patterns are tested:
|
||||
# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx
|
||||
# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py *.f90
|
||||
# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py
|
||||
|
||||
FILE_PATTERNS = *.c \
|
||||
*.h
|
||||
|
@ -575,14 +499,6 @@ EXCLUDE_SYMLINKS = NO
|
|||
|
||||
EXCLUDE_PATTERNS =
|
||||
|
||||
# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
|
||||
# (namespaces, classes, functions, etc.) that should be excluded from the
|
||||
# output. The symbol name can be a fully qualified name, a word, or if the
|
||||
# wildcard * is used, a substring. Examples: ANamespace, AClass,
|
||||
# AClass::ANamespace, ANamespace::*Test
|
||||
|
||||
EXCLUDE_SYMBOLS =
|
||||
|
||||
# The EXAMPLE_PATH tag can be used to specify one or more files or
|
||||
# directories that contain example code fragments that are included (see
|
||||
# the \include command).
|
||||
|
@ -643,7 +559,7 @@ FILTER_SOURCE_FILES = NO
|
|||
# Note: To get rid of all source code in the generated output, make sure also
|
||||
# VERBATIM_HEADERS is set to NO.
|
||||
|
||||
SOURCE_BROWSER = YES
|
||||
SOURCE_BROWSER = NO
|
||||
|
||||
# Setting the INLINE_SOURCES tag to YES will include the body
|
||||
# of functions and classes directly in the documentation.
|
||||
|
@ -656,13 +572,13 @@ INLINE_SOURCES = NO
|
|||
|
||||
STRIP_CODE_COMMENTS = YES
|
||||
|
||||
# If the REFERENCED_BY_RELATION tag is set to YES
|
||||
# If the REFERENCED_BY_RELATION tag is set to YES (the default)
|
||||
# then for each documented function all documented
|
||||
# functions referencing it will be listed.
|
||||
|
||||
REFERENCED_BY_RELATION = YES
|
||||
|
||||
# If the REFERENCES_RELATION tag is set to YES
|
||||
# If the REFERENCES_RELATION tag is set to YES (the default)
|
||||
# then for each documented function all documented entities
|
||||
# called/used by that function will be listed.
|
||||
|
||||
|
@ -754,46 +670,19 @@ HTML_FOOTER =
|
|||
|
||||
HTML_STYLESHEET =
|
||||
|
||||
# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes,
|
||||
# files or namespaces will be aligned in HTML using tables. If set to
|
||||
# NO a bullet list will be used.
|
||||
|
||||
HTML_ALIGN_MEMBERS = YES
|
||||
|
||||
# If the GENERATE_HTMLHELP tag is set to YES, additional index files
|
||||
# will be generated that can be used as input for tools like the
|
||||
# Microsoft HTML help workshop to generate a compiled HTML help file (.chm)
|
||||
# Microsoft HTML help workshop to generate a compressed HTML help file (.chm)
|
||||
# of the generated HTML documentation.
|
||||
|
||||
GENERATE_HTMLHELP = NO
|
||||
|
||||
# If the GENERATE_DOCSET tag is set to YES, additional index files
|
||||
# will be generated that can be used as input for Apple's Xcode 3
|
||||
# integrated development environment, introduced with OSX 10.5 (Leopard).
|
||||
# To create a documentation set, doxygen will generate a Makefile in the
|
||||
# HTML output directory. Running make will produce the docset in that
|
||||
# directory and running "make install" will install the docset in
|
||||
# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find
|
||||
# it at startup.
|
||||
|
||||
GENERATE_DOCSET = NO
|
||||
|
||||
# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the
|
||||
# feed. A documentation feed provides an umbrella under which multiple
|
||||
# documentation sets from a single provider (such as a company or product suite)
|
||||
# can be grouped.
|
||||
|
||||
DOCSET_FEEDNAME = "Doxygen generated docs for Tor"
|
||||
|
||||
# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that
|
||||
# should uniquely identify the documentation set bundle. This should be a
|
||||
# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen
|
||||
# will append .docset to the name.
|
||||
|
||||
DOCSET_BUNDLE_ID = org.torproject.Tor
|
||||
|
||||
# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
|
||||
# documentation will contain sections that can be hidden and shown after the
|
||||
# page has loaded. For this to work a browser that supports
|
||||
# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox
|
||||
# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari).
|
||||
|
||||
HTML_DYNAMIC_SECTIONS = NO
|
||||
|
||||
# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can
|
||||
# be used to specify the file name of the resulting .chm file. You
|
||||
# can add a path in front of the file if the result should not be
|
||||
|
@ -814,12 +703,6 @@ HHC_LOCATION =
|
|||
|
||||
GENERATE_CHI = NO
|
||||
|
||||
# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING
|
||||
# is used to encode HtmlHelp index (hhk), content (hhc) and project file
|
||||
# content.
|
||||
|
||||
CHM_INDEX_ENCODING =
|
||||
|
||||
# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag
|
||||
# controls whether a binary table of contents is generated (YES) or a
|
||||
# normal table of contents (NO) in the .chm file.
|
||||
|
@ -842,20 +725,12 @@ DISABLE_INDEX = NO
|
|||
|
||||
ENUM_VALUES_PER_LINE = 4
|
||||
|
||||
# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index
|
||||
# structure should be generated to display hierarchical information.
|
||||
# If the tag value is set to FRAME, a side panel will be generated
|
||||
# containing a tree-like index structure (just like the one that
|
||||
# If the GENERATE_TREEVIEW tag is set to YES, a side panel will be
|
||||
# generated containing a tree-like index structure (just like the one that
|
||||
# is generated for HTML Help). For this to work a browser that supports
|
||||
# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+,
|
||||
# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are
|
||||
# probably better off using the HTML help feature. Other possible values
|
||||
# for this tag are: HIERARCHIES, which will generate the Groups, Directories,
|
||||
# and Class Hiererachy pages using a tree view instead of an ordered list;
|
||||
# ALL, which combines the behavior of FRAME and HIERARCHIES; and NONE, which
|
||||
# disables this behavior completely. For backwards compatibility with previous
|
||||
# releases of Doxygen, the values YES and NO are equivalent to FRAME and NONE
|
||||
# respectively.
|
||||
# probably better off using the HTML help feature.
|
||||
|
||||
GENERATE_TREEVIEW = NO
|
||||
|
||||
|
@ -865,14 +740,6 @@ GENERATE_TREEVIEW = NO
|
|||
|
||||
TREEVIEW_WIDTH = 250
|
||||
|
||||
# Use this tag to change the font size of Latex formulas included
|
||||
# as images in the HTML documentation. The default is 10. Note that
|
||||
# when you change the font size after a successful doxygen run you need
|
||||
# to manually remove any form_*.png images from the HTML output directory
|
||||
# to force them to be regenerated.
|
||||
|
||||
FORMULA_FONTSIZE = 10
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the LaTeX output
|
||||
#---------------------------------------------------------------------------
|
||||
|
@ -1035,6 +902,18 @@ GENERATE_XML = NO
|
|||
|
||||
XML_OUTPUT = xml
|
||||
|
||||
# The XML_SCHEMA tag can be used to specify an XML schema,
|
||||
# which can be used by a validating XML parser to check the
|
||||
# syntax of the XML files.
|
||||
|
||||
XML_SCHEMA =
|
||||
|
||||
# The XML_DTD tag can be used to specify an XML DTD,
|
||||
# which can be used by a validating XML parser to check the
|
||||
# syntax of the XML files.
|
||||
|
||||
XML_DTD =
|
||||
|
||||
# If the XML_PROGRAMLISTING tag is set to YES Doxygen will
|
||||
# dump the program listings (including syntax highlighting
|
||||
# and cross-referencing information) to the XML output. Note that
|
||||
|
@ -1209,15 +1088,6 @@ PERL_PATH = /usr/bin/perl
|
|||
|
||||
CLASS_DIAGRAMS = YES
|
||||
|
||||
# You can define message sequence charts within doxygen comments using the \msc
|
||||
# command. Doxygen will then run the mscgen tool (see
|
||||
# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the
|
||||
# documentation. The MSCGEN_PATH tag allows you to specify the directory where
|
||||
# the mscgen tool resides. If left empty the tool is assumed to be found in the
|
||||
# default search path.
|
||||
|
||||
MSCGEN_PATH =
|
||||
|
||||
# If set to YES, the inheritance and collaboration graphs will hide
|
||||
# inheritance and usage relations if the target is undocumented
|
||||
# or is not a class.
|
||||
|
@ -1231,24 +1101,6 @@ HIDE_UNDOC_RELATIONS = YES
|
|||
|
||||
HAVE_DOT = NO
|
||||
|
||||
# By default doxygen will write a font called FreeSans.ttf to the output
|
||||
# directory and reference it in all dot files that doxygen generates. This
|
||||
# font does not include all possible unicode characters however, so when you need
|
||||
# these (or just want a differently looking font) you can specify the font name
|
||||
# using DOT_FONTNAME. You need need to make sure dot is able to find the font,
|
||||
# which can be done by putting it in a standard location or by setting the
|
||||
# DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory
|
||||
# containing the font.
|
||||
|
||||
DOT_FONTNAME =
|
||||
|
||||
# By default doxygen will tell dot to use the output directory to look for the
|
||||
# FreeSans.ttf font (which doxygen will put there itself). If you specify a
|
||||
# different font using DOT_FONTNAME you can set the path where dot
|
||||
# can find it using this tag.
|
||||
|
||||
DOT_FONTPATH =
|
||||
|
||||
# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen
|
||||
# will generate a graph for each documented class showing the direct and
|
||||
# indirect inheritance relations. Setting this tag to YES will force the
|
||||
|
@ -1293,19 +1145,19 @@ INCLUDE_GRAPH = YES
|
|||
|
||||
INCLUDED_BY_GRAPH = YES
|
||||
|
||||
# If the CALL_GRAPH and HAVE_DOT options are set to YES then
|
||||
# doxygen will generate a call dependency graph for every global function
|
||||
# or class method. Note that enabling this option will significantly increase
|
||||
# the time of a run. So in most cases it will be better to enable call graphs
|
||||
# for selected functions only using the \callgraph command.
|
||||
# If the CALL_GRAPH and HAVE_DOT tags are set to YES then doxygen will
|
||||
# generate a call dependency graph for every global function or class method.
|
||||
# Note that enabling this option will significantly increase the time of a run.
|
||||
# So in most cases it will be better to enable call graphs for selected
|
||||
# functions only using the \callgraph command.
|
||||
|
||||
CALL_GRAPH = NO
|
||||
|
||||
# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then
|
||||
# doxygen will generate a caller dependency graph for every global function
|
||||
# or class method. Note that enabling this option will significantly increase
|
||||
# the time of a run. So in most cases it will be better to enable caller
|
||||
# graphs for selected functions only using the \callergraph command.
|
||||
# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then doxygen will
|
||||
# generate a caller dependency graph for every global function or class method.
|
||||
# Note that enabling this option will significantly increase the time of a run.
|
||||
# So in most cases it will be better to enable caller graphs for selected
|
||||
# functions only using the \callergraph command.
|
||||
|
||||
CALLER_GRAPH = NO
|
||||
|
||||
|
@ -1338,31 +1190,39 @@ DOT_PATH =
|
|||
|
||||
DOTFILE_DIRS =
|
||||
|
||||
# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of
|
||||
# nodes that will be shown in the graph. If the number of nodes in a graph
|
||||
# becomes larger than this value, doxygen will truncate the graph, which is
|
||||
# visualized by representing a node as a red box. Note that doxygen if the
|
||||
# number of direct children of the root node in a graph is already larger than
|
||||
# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note
|
||||
# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH.
|
||||
# The MAX_DOT_GRAPH_WIDTH tag can be used to set the maximum allowed width
|
||||
# (in pixels) of the graphs generated by dot. If a graph becomes larger than
|
||||
# this value, doxygen will try to truncate the graph, so that it fits within
|
||||
# the specified constraint. Beware that most browsers cannot cope with very
|
||||
# large images.
|
||||
|
||||
DOT_GRAPH_MAX_NODES = 50
|
||||
MAX_DOT_GRAPH_WIDTH = 1024
|
||||
|
||||
# The MAX_DOT_GRAPH_HEIGHT tag can be used to set the maximum allows height
|
||||
# (in pixels) of the graphs generated by dot. If a graph becomes larger than
|
||||
# this value, doxygen will try to truncate the graph, so that it fits within
|
||||
# the specified constraint. Beware that most browsers cannot cope with very
|
||||
# large images.
|
||||
|
||||
MAX_DOT_GRAPH_HEIGHT = 1024
|
||||
|
||||
# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the
|
||||
# graphs generated by dot. A depth value of 3 means that only nodes reachable
|
||||
# from the root by following a path via at most 3 edges will be shown. Nodes
|
||||
# that lay further from the root node will be omitted. Note that setting this
|
||||
# option to 1 or 2 may greatly reduce the computation time needed for large
|
||||
# code bases. Also note that the size of a graph can be further restricted by
|
||||
# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction.
|
||||
# code bases. Also note that a graph may be further truncated if the graph's
|
||||
# image dimensions are not sufficient to fit the graph (see MAX_DOT_GRAPH_WIDTH
|
||||
# and MAX_DOT_GRAPH_HEIGHT). If 0 is used for the depth value (the default),
|
||||
# the graph is not depth-constrained.
|
||||
|
||||
MAX_DOT_GRAPH_DEPTH = 0
|
||||
|
||||
# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent
|
||||
# background. This is enabled by default, which results in a transparent
|
||||
# background. Warning: Depending on the platform used, enabling this option
|
||||
# may lead to badly anti-aliased labels on the edges of a graph (i.e. they
|
||||
# become hard to read).
|
||||
# background. This is disabled by default, which results in a white background.
|
||||
# Warning: Depending on the platform used, enabling this option may lead to
|
||||
# badly anti-aliased labels on the edges of a graph (i.e. they become hard to
|
||||
# read).
|
||||
|
||||
DOT_TRANSPARENT = NO
|
||||
|
||||
|
|
31
INSTALL
31
INSTALL
|
@ -3,7 +3,7 @@ Most users who realize that INSTALL files still exist should simply
|
|||
follow the directions at
|
||||
https://www.torproject.org/docs/tor-doc-unix
|
||||
|
||||
If you got the source from git, run "./autogen.sh", which will
|
||||
If you got the source from Subversion, run "./autogen.sh", which will
|
||||
run the various auto* programs. Then you can run ./configure, and
|
||||
refer to the above instructions.
|
||||
|
||||
|
@ -21,32 +21,5 @@ If it doesn't build for you:
|
|||
For example, "setenv LD_LIBRARY_PATH /usr/athena/lib".
|
||||
|
||||
Lastly, check out
|
||||
https://www.torproject.org/docs/faq#DoesntWork
|
||||
|
||||
How to do static builds of tor:
|
||||
|
||||
Tor supports linking each of the libraries it needs statically. Use the
|
||||
--enable-static-X ./configure option in conjunction with the --with-X-dir
|
||||
option for libevent, zlib, and openssl. For this to work sanely, libevent
|
||||
should be built with --disable-shared --enable-static --with-pic, and
|
||||
OpenSSL should be built with no-shared no-dso.
|
||||
|
||||
If you need to build tor so that system libraries are also statically linked,
|
||||
use the --enable-static-tor ./configure option. This won't work on OS X
|
||||
unless you build the required crt0.o yourself. It is also incompatible with
|
||||
the --enable-gcc-hardening option.
|
||||
|
||||
An example of how to build a mostly static tor:
|
||||
./configure --enable-static-libevent \
|
||||
--enable-static-openssl \
|
||||
--enable-static-zlib \
|
||||
--with-libevent-dir=/tmp/static-tor/libevent-1.4.14b-stable \
|
||||
--with-openssl-dir=/tmp/static-tor/openssl-0.9.8r/ \
|
||||
--with-zlib-dir=/tmp/static-tor/zlib-1.2.5
|
||||
|
||||
An example of how to build an entirely static tor:
|
||||
./configure --enable-static-tor \
|
||||
--with-libevent-dir=/tmp/static-tor/libevent-1.4.14b-stable \
|
||||
--with-openssl-dir=/tmp/static-tor/openssl-0.9.8r/ \
|
||||
--with-zlib-dir=/tmp/static-tor/zlib-1.2.5
|
||||
http://wiki.noreply.org/noreply/TheOnionRouter/TorFAQ#ItDoesntWork
|
||||
|
||||
|
|
273
LICENSE
273
LICENSE
|
@ -13,7 +13,7 @@ Tor is distributed under this license:
|
|||
|
||||
Copyright (c) 2001-2004, Roger Dingledine
|
||||
Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson
|
||||
Copyright (c) 2007-2017, The Tor Project, Inc.
|
||||
Copyright (c) 2007-2011, The Tor Project, Inc.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are
|
||||
|
@ -43,7 +43,7 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
===============================================================================
|
||||
src/ext/strlcat.c and src/ext/strlcpy.c by Todd C. Miller are licensed
|
||||
src/common/strlcat.c and src/common/strlcpy.c by Todd C. Miller are licensed
|
||||
under the following license:
|
||||
|
||||
* Copyright (c) 1998 Todd C. Miller <Todd.Miller@courtesan.com>
|
||||
|
@ -70,90 +70,6 @@ under the following license:
|
|||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
===============================================================================
|
||||
src/ext/tor_queue.h is licensed under the following license:
|
||||
|
||||
* Copyright (c) 1991, 1993
|
||||
* The Regents of the University of California. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. Neither the name of the University nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
|
||||
===============================================================================
|
||||
src/ext/csiphash.c is licensed under the following license:
|
||||
|
||||
Copyright (c) 2013 Marek Majkowski <marek@popcount.org>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
===============================================================================
|
||||
Trunnel is distributed under this license:
|
||||
|
||||
Copyright 2014 The Tor Project, Inc.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are
|
||||
met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
|
||||
* Redistributions in binary form must reproduce the above
|
||||
copyright notice, this list of conditions and the following disclaimer
|
||||
in the documentation and/or other materials provided with the
|
||||
distribution.
|
||||
|
||||
* Neither the names of the copyright owners nor the names of its
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
===============================================================================
|
||||
src/config/geoip is licensed under the following license:
|
||||
|
@ -189,191 +105,6 @@ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
|||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
DATABASE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
===============================================================================
|
||||
m4/pc_from_ucontext.m4 is available under the following license. Note that
|
||||
it is *not* built into the Tor software.
|
||||
|
||||
Copyright (c) 2005, Google Inc.
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are
|
||||
met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above
|
||||
copyright notice, this list of conditions and the following disclaimer
|
||||
in the documentation and/or other materials provided with the
|
||||
distribution.
|
||||
* Neither the name of Google Inc. nor the names of its
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
===============================================================================
|
||||
m4/pkg.m4 is available under the following license. Note that
|
||||
it is *not* built into the Tor software.
|
||||
|
||||
pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
|
||||
serial 1 (pkg-config-0.24)
|
||||
|
||||
Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
|
||||
|
||||
This program 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 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program 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 this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
As a special exception to the GNU General Public License, if you
|
||||
distribute this file as part of a program that contains a
|
||||
configuration script generated by Autoconf, you may include it under
|
||||
the same distribution terms that you use for the rest of that program.
|
||||
===============================================================================
|
||||
src/ext/readpassphrase.[ch] are distributed under this license:
|
||||
|
||||
Copyright (c) 2000-2002, 2007 Todd C. Miller <Todd.Miller@courtesan.com>
|
||||
|
||||
Permission to use, copy, modify, and distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
Sponsored in part by the Defense Advanced Research Projects
|
||||
Agency (DARPA) and Air Force Research Laboratory, Air Force
|
||||
Materiel Command, USAF, under agreement number F39502-99-1-0512.
|
||||
|
||||
===============================================================================
|
||||
src/ext/mulodi4.c is distributed under this license:
|
||||
|
||||
=========================================================================
|
||||
compiler_rt License
|
||||
=========================================================================
|
||||
|
||||
The compiler_rt library is dual licensed under both the
|
||||
University of Illinois "BSD-Like" license and the MIT license.
|
||||
As a user of this code you may choose to use it under either
|
||||
license. As a contributor, you agree to allow your code to be
|
||||
used under both.
|
||||
|
||||
Full text of the relevant licenses is included below.
|
||||
|
||||
=========================================================================
|
||||
|
||||
University of Illinois/NCSA
|
||||
Open Source License
|
||||
|
||||
Copyright (c) 2009-2016 by the contributors listed in CREDITS.TXT
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Developed by:
|
||||
|
||||
LLVM Team
|
||||
|
||||
University of Illinois at Urbana-Champaign
|
||||
|
||||
http://llvm.org
|
||||
|
||||
Permission is hereby granted, free of charge, to any person
|
||||
obtaining a copy of this software and associated documentation
|
||||
files (the "Software"), to deal with the Software without
|
||||
restriction, including without limitation the rights to use,
|
||||
copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the
|
||||
Software is furnished to do so, subject to the following
|
||||
conditions:
|
||||
|
||||
* Redistributions of source code must retain the above
|
||||
copyright notice, this list of conditions and the following
|
||||
disclaimers.
|
||||
|
||||
* Redistributions in binary form must reproduce the above
|
||||
copyright notice, this list of conditions and the following
|
||||
disclaimers in the documentation and/or other materials
|
||||
provided with the distribution.
|
||||
|
||||
* Neither the names of the LLVM Team, University of Illinois
|
||||
at Urbana-Champaign, nor the names of its contributors may
|
||||
be used to endorse or promote products derived from this
|
||||
Software without specific prior written permission.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
||||
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE CONTRIBUTORS OR COPYRIGHT
|
||||
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
OTHER DEALINGS WITH THE SOFTWARE.
|
||||
|
||||
=========================================================================
|
||||
|
||||
Copyright (c) 2009-2015 by the contributors listed in CREDITS.TXT
|
||||
|
||||
Permission is hereby granted, free of charge, to any person
|
||||
obtaining a copy of this software and associated documentation
|
||||
files (the "Software"), to deal in the Software without
|
||||
restriction, including without limitation the rights to use,
|
||||
copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the
|
||||
Software is furnished to do so, subject to the following
|
||||
conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
||||
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
=========================================================================
|
||||
Copyrights and Licenses for Third Party Software Distributed with LLVM:
|
||||
=========================================================================
|
||||
|
||||
The LLVM software contains code written by third parties. Such
|
||||
software will have its own individual LICENSE.TXT file in the
|
||||
directory in which it appears. This file will describe the
|
||||
copyrights, license, and restrictions which apply to that code.
|
||||
|
||||
The disclaimer of warranty in the University of Illinois Open
|
||||
Source License applies to all code in the LLVM Distribution, and
|
||||
nothing in any of the other licenses gives permission to use the
|
||||
names of the LLVM Team or the University of Illinois to endorse
|
||||
or promote products derived from this Software.
|
||||
|
||||
===============================================================================
|
||||
If you got Tor as a static binary with OpenSSL included, then you should know:
|
||||
"This product includes software developed by the OpenSSL Project
|
||||
|
|
319
Makefile.am
319
Makefile.am
|
@ -1,285 +1,78 @@
|
|||
# $Id$
|
||||
# Copyright (c) 2001-2004, Roger Dingledine
|
||||
# Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson
|
||||
# Copyright (c) 2007-2017, The Tor Project, Inc.
|
||||
# Copyright (c) 2007-2011, The Tor Project, Inc.
|
||||
# See LICENSE for licensing information
|
||||
|
||||
ACLOCAL_AMFLAGS = -I m4
|
||||
AUTOMAKE_OPTIONS = foreign 1.7
|
||||
# else it keeps trying to put COPYING back in
|
||||
|
||||
noinst_LIBRARIES=
|
||||
EXTRA_DIST=
|
||||
noinst_HEADERS=
|
||||
bin_PROGRAMS=
|
||||
EXTRA_PROGRAMS=
|
||||
CLEANFILES=
|
||||
TESTS=
|
||||
noinst_PROGRAMS=
|
||||
DISTCLEANFILES=
|
||||
bin_SCRIPTS=
|
||||
AM_CPPFLAGS=
|
||||
AM_CFLAGS=@TOR_SYSTEMD_CFLAGS@ @CFLAGS_BUGTRAP@ @TOR_LZMA_CFLAGS@ @TOR_ZSTD_CFLAGS@
|
||||
SHELL=@SHELL@
|
||||
SUBDIRS = src doc contrib
|
||||
|
||||
if COVERAGE_ENABLED
|
||||
TESTING_TOR_BINARY=$(top_builddir)/src/or/tor-cov$(EXEEXT)
|
||||
else
|
||||
TESTING_TOR_BINARY=$(top_builddir)/src/or/tor$(EXEEXT)
|
||||
endif
|
||||
DIST_SUBDIRS = src doc contrib
|
||||
|
||||
if USE_RUST
|
||||
rust_ldadd=$(top_builddir)/src/rust/target/release/@TOR_RUST_STATIC_NAME@ \
|
||||
@TOR_RUST_EXTRA_LIBS@
|
||||
else
|
||||
rust_ldadd=
|
||||
endif
|
||||
|
||||
include src/include.am
|
||||
include doc/include.am
|
||||
include contrib/include.am
|
||||
|
||||
EXTRA_DIST+= \
|
||||
ChangeLog \
|
||||
CONTRIBUTING \
|
||||
INSTALL \
|
||||
LICENSE \
|
||||
Makefile.nmake \
|
||||
README \
|
||||
ReleaseNotes \
|
||||
scripts/maint/checkSpace.pl
|
||||
|
||||
## This tells etags how to find mockable function definitions.
|
||||
AM_ETAGSFLAGS=--regex='{c}/MOCK_IMPL([^,]+,\W*\([a-zA-Z0-9_]+\)\W*,/\1/s'
|
||||
|
||||
if COVERAGE_ENABLED
|
||||
TEST_CFLAGS=-fno-inline -fprofile-arcs -ftest-coverage
|
||||
if DISABLE_ASSERTS_IN_UNIT_TESTS
|
||||
TEST_CPPFLAGS=-DTOR_UNIT_TESTS -DTOR_COVERAGE -DDISABLE_ASSERTS_IN_UNIT_TESTS @TOR_MODULES_ALL_ENABLED@
|
||||
else
|
||||
TEST_CPPFLAGS=-DTOR_UNIT_TESTS -DTOR_COVERAGE @TOR_MODULES_ALL_ENABLED@
|
||||
endif
|
||||
TEST_NETWORK_FLAGS=--coverage --hs-multi-client 1
|
||||
else
|
||||
TEST_CFLAGS=
|
||||
TEST_CPPFLAGS=-DTOR_UNIT_TESTS @TOR_MODULES_ALL_ENABLED@
|
||||
TEST_NETWORK_FLAGS=--hs-multi-client 1
|
||||
endif
|
||||
TEST_NETWORK_WARNING_FLAGS=--quiet --only-warnings
|
||||
|
||||
if LIBFUZZER_ENABLED
|
||||
TEST_CFLAGS += -fsanitize-coverage=trace-pc-guard,trace-cmp,trace-div
|
||||
# not "edge"
|
||||
endif
|
||||
|
||||
TEST_NETWORK_ALL_LOG_DIR=$(top_builddir)/test_network_log
|
||||
TEST_NETWORK_ALL_DRIVER_FLAGS=--color-tests yes
|
||||
EXTRA_DIST = INSTALL README AUTHORS LICENSE ChangeLog \
|
||||
ReleaseNotes tor.spec tor.spec.in
|
||||
|
||||
#install-data-local:
|
||||
# $(INSTALL) -m 755 -d $(LOCALSTATEDIR)/lib/tor
|
||||
|
||||
# Allows to override rpmbuild with rpmbuild-md5 from fedora-packager so that
|
||||
# building for EL5 won't fail on https://bugzilla.redhat.com/show_bug.cgi?id=490613
|
||||
RPMBUILD ?= rpmbuild
|
||||
# Assume a tarball is in .. for now.
|
||||
dist-rpm:
|
||||
RPM_BUILD_DIR="/tmp/tor-rpm-build-$$$$"; \
|
||||
rm -rf $$RPM_BUILD_DIR; \
|
||||
mkdir $$RPM_BUILD_DIR || exit 1; \
|
||||
for subdir in BUILD RPMS SOURCES SPECS SRPMS; do \
|
||||
mkdir $$RPM_BUILD_DIR/$$subdir; \
|
||||
done; \
|
||||
mkdir $$RPM_BUILD_DIR/SOURCES/tor-$(VERSION); \
|
||||
cp -R ./ $$RPM_BUILD_DIR/SOURCES/tor-$(VERSION)/; \
|
||||
pushd $$RPM_BUILD_DIR/SOURCES/; \
|
||||
tar zcf tor-$(VERSION).tar.gz ./; \
|
||||
popd; \
|
||||
LIBS=-lrt rpmbuild -ba --define "_topdir $$RPM_BUILD_DIR" tor.spec; \
|
||||
mv $$RPM_BUILD_DIR/SRPMS/* .; \
|
||||
mv $$RPM_BUILD_DIR/RPMS/* .; \
|
||||
rm -rf $$RPM_BUILD_DIR
|
||||
|
||||
# Use automake's dist-gzip target to build the tarball
|
||||
dist-rpm: dist-gzip
|
||||
TIMESTAMP=$$(date +"%Y-%m-%d_%H.%M.%S"); \
|
||||
RPM_BUILD_DIR=$$(mktemp -d "/tmp/tor-rpm-build-$$TIMESTAMP-XXXX"); \
|
||||
mkdir -p "$$RPM_BUILD_DIR"/{BUILD,RPMS,SOURCES/"tor-$(VERSION)",SPECS,SRPMS}; \
|
||||
cp -fa "$(distdir).tar.gz" "$$RPM_BUILD_DIR"/SOURCES/; \
|
||||
LIBS=-lrt $(RPMBUILD) -ba --define "_topdir $$RPM_BUILD_DIR" tor.spec; \
|
||||
cp -fa "$$RPM_BUILD_DIR"/SRPMS/* .; \
|
||||
cp -fa "$$RPM_BUILD_DIR"/RPMS/* .; \
|
||||
rm -rf "$$RPM_BUILD_DIR"; \
|
||||
echo "RPM build finished"; \
|
||||
#end of dist-rpm
|
||||
dist-osx:
|
||||
@if [ "x$(prefix)" != 'x/Library/Tor' ]; then \
|
||||
echo "Configure with --prefix=/Library/Tor, please"; \
|
||||
exit 1; \
|
||||
fi; \
|
||||
if [ "x$(bindir)" != 'x/Library/Tor' ]; then \
|
||||
echo "Configure with --bindir=/Library/Tor, please"; \
|
||||
exit 1; \
|
||||
fi; \
|
||||
if [ "x$(sysconfdir)" != 'x/Library' ]; then \
|
||||
echo "Configure with --sysconfdir=/Library, please"; \
|
||||
exit 1; \
|
||||
fi; \
|
||||
if [ "x$(CONFDIR)" != 'x/Library/Tor' ]; then \
|
||||
echo "Configure with CONFDIR=/Library/Tor, please"; \
|
||||
fi
|
||||
$(MAKE) all
|
||||
VERSION=$(VERSION) sh ./contrib/osx/package.sh
|
||||
|
||||
dist: check
|
||||
|
||||
doxygen:
|
||||
doxygen && cd doc/doxygen/latex && make
|
||||
|
||||
test: all
|
||||
$(top_builddir)/src/test/test
|
||||
test:
|
||||
./src/or/test
|
||||
|
||||
check-local: check-spaces check-changes
|
||||
|
||||
need-chutney-path:
|
||||
@if test ! -d "$$CHUTNEY_PATH"; then \
|
||||
echo '$$CHUTNEY_PATH was not set.'; \
|
||||
if test -d $(top_srcdir)/../chutney -a -x $(top_srcdir)/../chutney/chutney; then \
|
||||
echo "Assuming test-network.sh will find" $(top_srcdir)/../chutney; \
|
||||
else \
|
||||
echo; \
|
||||
echo "To run these tests, git clone https://git.torproject.org/chutney.git ; export CHUTNEY_PATH=\`pwd\`/chutney"; \
|
||||
exit 1; \
|
||||
fi \
|
||||
fi
|
||||
|
||||
# Note that test-network requires a copy of Chutney in $CHUTNEY_PATH.
|
||||
# Chutney can be cloned from https://git.torproject.org/chutney.git .
|
||||
test-network: need-chutney-path $(TESTING_TOR_BINARY) src/tools/tor-gencert
|
||||
$(top_srcdir)/src/test/test-network.sh $(TEST_NETWORK_FLAGS)
|
||||
|
||||
# Run all available tests using automake's test-driver
|
||||
# only run IPv6 tests if we can ping6 ::1 (localhost)
|
||||
# only run IPv6 tests if we can ping ::1 (localhost)
|
||||
# some IPv6 tests will fail without an IPv6 DNS server (see #16971 and #17011)
|
||||
# only run mixed tests if we have a tor-stable binary
|
||||
# Try the syntax for BSD ping6, Linux ping6, and Linux ping -6,
|
||||
# because they're incompatible
|
||||
test-network-all: need-chutney-path test-driver $(TESTING_TOR_BINARY) src/tools/tor-gencert
|
||||
mkdir -p $(TEST_NETWORK_ALL_LOG_DIR)
|
||||
@flavors="$(TEST_CHUTNEY_FLAVORS)"; \
|
||||
if ping6 -q -c 1 -o ::1 >/dev/null 2>&1 || ping6 -q -c 1 -W 1 ::1 >/dev/null 2>&1 || ping -6 -c 1 -W 1 ::1 >/dev/null 2>&1; then \
|
||||
echo "ping6 ::1 or ping ::1 succeeded, running IPv6 flavors: $(TEST_CHUTNEY_FLAVORS_IPV6)."; \
|
||||
flavors="$$flavors $(TEST_CHUTNEY_FLAVORS_IPV6)"; \
|
||||
else \
|
||||
echo "ping6 ::1 and ping ::1 failed, skipping IPv6 flavors: $(TEST_CHUTNEY_FLAVORS_IPV6)."; \
|
||||
skip_flavors="$$skip_flavors $(TEST_CHUTNEY_FLAVORS_IPV6)"; \
|
||||
fi; \
|
||||
if command -v tor-stable >/dev/null 2>&1; then \
|
||||
echo "tor-stable found, running mixed flavors: $(TEST_CHUTNEY_FLAVORS_MIXED)."; \
|
||||
flavors="$$flavors $(TEST_CHUTNEY_FLAVORS_MIXED)"; \
|
||||
else \
|
||||
echo "tor-stable not found, skipping mixed flavors: $(TEST_CHUTNEY_FLAVORS_MIXED)."; \
|
||||
skip_flavors="$$skip_flavors $(TEST_CHUTNEY_FLAVORS_MIXED)"; \
|
||||
fi; \
|
||||
for f in $$skip_flavors; do \
|
||||
echo "SKIP: $$f"; \
|
||||
done; \
|
||||
for f in $$flavors; do \
|
||||
$(SHELL) $(top_srcdir)/test-driver --test-name $$f --log-file $(TEST_NETWORK_ALL_LOG_DIR)/$$f.log --trs-file $(TEST_NETWORK_ALL_LOG_DIR)/$$f.trs $(TEST_NETWORK_ALL_DRIVER_FLAGS) $(top_srcdir)/src/test/test-network.sh --flavor $$f $(TEST_NETWORK_FLAGS); \
|
||||
$(top_srcdir)/src/test/test-network.sh $(TEST_NETWORK_WARNING_FLAGS); \
|
||||
done; \
|
||||
echo "Log and result files are available in $(TEST_NETWORK_ALL_LOG_DIR)."; \
|
||||
! grep -q FAIL test_network_log/*.trs
|
||||
|
||||
need-stem-path:
|
||||
@if test ! -d "$$STEM_SOURCE_DIR"; then \
|
||||
echo '$$STEM_SOURCE_DIR was not set.'; echo; \
|
||||
echo "To run these tests, git clone https://git.torproject.org/stem.git/ ; export STEM_SOURCE_DIR=\`pwd\`/stem"; \
|
||||
exit 1; \
|
||||
fi
|
||||
|
||||
test-stem: need-stem-path $(TESTING_TOR_BINARY)
|
||||
@$(PYTHON) "$$STEM_SOURCE_DIR"/run_tests.py --tor "$(TESTING_TOR_BINARY)" --all --log notice --target RUN_ALL;
|
||||
|
||||
test-stem-full: need-stem-path $(TESTING_TOR_BINARY)
|
||||
@$(PYTHON) "$$STEM_SOURCE_DIR"/run_tests.py --tor "$(TESTING_TOR_BINARY)" --all --log notice --target RUN_ALL,ONLINE -v;
|
||||
|
||||
test-full: need-stem-path need-chutney-path check test-network test-stem
|
||||
|
||||
test-full-online: need-stem-path need-chutney-path check test-network test-stem-full
|
||||
|
||||
reset-gcov:
|
||||
rm -f $(top_builddir)/src/*/*.gcda $(top_builddir)/src/*/*/*.gcda
|
||||
|
||||
HTML_COVER_DIR=$(top_builddir)/coverage_html
|
||||
coverage-html: all
|
||||
if COVERAGE_ENABLED
|
||||
test -e "`which lcov`" || (echo "lcov must be installed. See <http://ltp.sourceforge.net/coverage/lcov.php>." && false)
|
||||
test -d "$(HTML_COVER_DIR)" || $(MKDIR_P) "$(HTML_COVER_DIR)"
|
||||
lcov --rc lcov_branch_coverage=1 --directory $(top_builddir)/src --zerocounters
|
||||
$(MAKE) reset-gcov
|
||||
$(MAKE) check
|
||||
lcov --capture --rc lcov_branch_coverage=1 --no-external --directory $(top_builddir) --base-directory $(top_srcdir) --output-file "$(HTML_COVER_DIR)/lcov.tmp"
|
||||
lcov --remove "$(HTML_COVER_DIR)/lcov.tmp" --rc lcov_branch_coverage=1 'test/*' 'ext/tinytest*' '/usr/*' --output-file "$(HTML_COVER_DIR)/lcov.info"
|
||||
genhtml --branch-coverage -o "$(HTML_COVER_DIR)" "$(HTML_COVER_DIR)/lcov.info"
|
||||
else
|
||||
@printf "Not configured with --enable-coverage, run ./configure --enable-coverage\n"
|
||||
endif
|
||||
|
||||
coverage-html-full: all
|
||||
test -e "`which lcov`" || (echo "lcov must be installed. See <http://ltp.sourceforge.net/coverage/lcov.php>." && false)
|
||||
test -d "$(HTML_COVER_DIR)" || mkdir -p "$(HTML_COVER_DIR)"
|
||||
lcov --rc lcov_branch_coverage=1 --directory ./src --zerocounters
|
||||
$(MAKE) reset-gcov
|
||||
$(MAKE) check
|
||||
$(MAKE) test-stem-full
|
||||
CHUTNEY_TOR=tor-cov CHUTNEY_TOR_GENCERT=tor-cov-gencert $(top_srcdir)/src/test/test-network.sh
|
||||
CHUTNEY_TOR=tor-cov CHUTNEY_TOR_GENCERT=tor-cov-gencert $(top_srcdir)/src/test/test-network.sh --flavor hs
|
||||
lcov --capture --rc lcov_branch_coverage=1 --no-external --directory . --output-file "$(HTML_COVER_DIR)/lcov.tmp"
|
||||
lcov --remove "$(HTML_COVER_DIR)/lcov.tmp" --rc lcov_branch_coverage=1 'test/*' 'ext/tinytest*' '/usr/*' --output-file "$(HTML_COVER_DIR)/lcov.info"
|
||||
genhtml --branch-coverage -o "$(HTML_COVER_DIR)" "$(HTML_COVER_DIR)/lcov.info"
|
||||
|
||||
# Avoid strlcpy.c, strlcat.c, aes.c, OpenBSD_malloc_Linux.c, sha256.c,
|
||||
# tinytest*.[ch]
|
||||
# Avoid strlcpy.c, strlcat.c, tree.h
|
||||
check-spaces:
|
||||
if USE_PERL
|
||||
$(PERL) $(top_srcdir)/scripts/maint/checkSpace.pl -C \
|
||||
$(top_srcdir)/src/common/*.[ch] \
|
||||
$(top_srcdir)/src/or/*.[ch] \
|
||||
$(top_srcdir)/src/test/*.[ch] \
|
||||
$(top_srcdir)/src/test/*/*.[ch] \
|
||||
$(top_srcdir)/src/tools/*.[ch]
|
||||
endif
|
||||
./contrib/checkSpace.pl -C \
|
||||
src/common/*.h \
|
||||
src/common/[^asO]*.c src/common/address.c \
|
||||
src/or/[^et]*.[ch] src/or/t*.c src/or/eventdns_tor.h
|
||||
|
||||
check-docs: all
|
||||
$(PERL) $(top_builddir)/scripts/maint/checkOptionDocs.pl
|
||||
check-docs:
|
||||
./contrib/checkOptionDocs.pl
|
||||
|
||||
check-logs:
|
||||
$(top_srcdir)/scripts/maint/checkLogs.pl \
|
||||
$(top_srcdir)/src/*/*.[ch] | sort -n
|
||||
./contrib/checkLogs.pl \
|
||||
src/*/*.[ch] | sort -n
|
||||
|
||||
.PHONY: check-typos
|
||||
check-typos:
|
||||
@if test -x "`which misspell 2>&1;true`"; then \
|
||||
echo "Checking for Typos ..."; \
|
||||
(misspell \
|
||||
$(top_srcdir)/src/[^e]*/*.[ch] \
|
||||
$(top_srcdir)/doc \
|
||||
$(top_srcdir)/contrib \
|
||||
$(top_srcdir)/scripts \
|
||||
$(top_srcdir)/README \
|
||||
$(top_srcdir)/ChangeLog \
|
||||
$(top_srcdir)/INSTALL \
|
||||
$(top_srcdir)/ReleaseNotes \
|
||||
$(top_srcdir)/LICENSE); \
|
||||
else \
|
||||
echo "Tor can use misspell to check for typos."; \
|
||||
echo "It seems that you don't have misspell installed."; \
|
||||
echo "You can install the latest version of misspell here: https://github.com/client9/misspell#install"; \
|
||||
fi
|
||||
|
||||
.PHONY: check-changes
|
||||
check-changes:
|
||||
if USEPYTHON
|
||||
@if test -d "$(top_srcdir)/changes"; then \
|
||||
$(PYTHON) $(top_srcdir)/scripts/maint/lintChanges.py $(top_srcdir)/changes; \
|
||||
fi
|
||||
endif
|
||||
|
||||
.PHONY: update-versions
|
||||
update-versions:
|
||||
$(PERL) $(top_builddir)/scripts/maint/updateVersions.pl
|
||||
|
||||
.PHONY: callgraph
|
||||
callgraph:
|
||||
$(top_builddir)/scripts/maint/run_calltool.sh
|
||||
|
||||
version:
|
||||
@echo "Tor @VERSION@"
|
||||
@if test -d "$(top_srcdir)/.git" && test -x "`which git 2>&1;true`"; then \
|
||||
echo -n "git: " ;\
|
||||
(cd "$(top_srcdir)" && git rev-parse --short=16 HEAD); \
|
||||
fi
|
||||
|
||||
mostlyclean-local:
|
||||
rm -f $(top_builddir)/src/*/*.gc{da,no} $(top_builddir)/src/*/*/*.gc{da,no}
|
||||
rm -rf $(HTML_COVER_DIR)
|
||||
rm -rf $(top_builddir)/doc/doxygen
|
||||
rm -rf $(TEST_NETWORK_ALL_LOG_DIR)
|
||||
|
||||
clean-local:
|
||||
rm -rf $(top_builddir)/src/rust/target
|
||||
rm -rf $(top_builddir)/src/rust/.cargo/registry
|
||||
|
||||
if USE_RUST
|
||||
distclean-local: distclean-rust
|
||||
endif
|
||||
|
||||
# This relies on some internal details of how automake implements
|
||||
# distcheck. We check two directories because automake-1.15 changed
|
||||
# from $(distdir)/_build to $(distdir)/_build/sub.
|
||||
show-distdir-testlog:
|
||||
@if test -d "$(distdir)/_build/sub"; then \
|
||||
cat $(distdir)/_build/sub/$(TEST_SUITE_LOG); \
|
||||
else \
|
||||
cat $(distdir)/_build/$(TEST_SUITE_LOG); fi
|
||||
|
|
|
@ -1,19 +0,0 @@
|
|||
all:
|
||||
cd src/common
|
||||
$(MAKE) /F Makefile.nmake
|
||||
cd ../../src/ext
|
||||
$(MAKE) /F Makefile.nmake
|
||||
cd ../../src/or
|
||||
$(MAKE) /F Makefile.nmake
|
||||
cd ../../src/test
|
||||
$(MAKE) /F Makefile.nmake
|
||||
|
||||
clean:
|
||||
cd src/common
|
||||
$(MAKE) /F Makefile.nmake clean
|
||||
cd ../../src/ext
|
||||
$(MAKE) /F Makefile.nmake clean
|
||||
cd ../../src/or
|
||||
$(MAKE) /F Makefile.nmake clean
|
||||
cd ../../src/test
|
||||
$(MAKE) /F Makefile.nmake clean
|
19
README
19
README
|
@ -4,29 +4,20 @@ is reasonably secure, but please ensure you read the instructions and
|
|||
configure it properly.
|
||||
|
||||
To build Tor from source:
|
||||
./configure && make && make install
|
||||
|
||||
To build Tor from a just-cloned git repository:
|
||||
sh autogen.sh && ./configure && make && make install
|
||||
./configure; make; make install
|
||||
|
||||
Home page:
|
||||
https://www.torproject.org/
|
||||
|
||||
Download new versions:
|
||||
https://www.torproject.org/download/download.html
|
||||
https://www.torproject.org/download.html
|
||||
|
||||
Documentation, including links to installation and setup instructions:
|
||||
https://www.torproject.org/docs/documentation.html
|
||||
https://www.torproject.org/documentation.html
|
||||
|
||||
Making applications work with Tor:
|
||||
https://wiki.torproject.org/projects/tor/wiki/doc/TorifyHOWTO
|
||||
https://wiki.torproject.org/noreply/TheOnionRouter/TorifyHOWTO
|
||||
|
||||
Frequently Asked Questions:
|
||||
https://www.torproject.org/docs/faq.html
|
||||
https://wiki.torproject.org/noreply/TheOnionRouter/TorFAQ
|
||||
|
||||
|
||||
To get started working on Tor development:
|
||||
See the doc/HACKING directory.
|
||||
|
||||
Release timeline:
|
||||
https://trac.torproject.org/projects/tor/wiki/org/teams/NetworkTeam/CoreTorReleases
|
||||
|
|
13590
ReleaseNotes
13590
ReleaseNotes
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,80 @@
|
|||
Changes related to compilation under MinGW/any sane win32 gcc
|
||||
=============================================================
|
||||
|
||||
* event.c
|
||||
- If gcc include "WIN32-Code/misc.h" instead of "misc.h"
|
||||
|
||||
* WIN32-Code/misc.h
|
||||
- Add struct prototypes for timeval and timezone
|
||||
|
||||
* buffer.c
|
||||
- changed type of "i" from "u_int" to "unsigned int". My MinGW wasn't
|
||||
recognizing it. (u_int is normally typedef'ed to unsigned int, right?)
|
||||
|
||||
* evbuffer.c
|
||||
- removed incorrect win32 error checking, see bufferevent_writecb().
|
||||
(this needs to be fixed by anyone planning to use evbuffer on win32)
|
||||
|
||||
* log.c
|
||||
- If gcc include "WIN32-Code/misc.h" instead of "misc.h"
|
||||
|
||||
* WIN32-Code/misc.c
|
||||
- if gcc, include "misc.h"
|
||||
- added newline at end of file to shut up gcc
|
||||
|
||||
* WIN32-Code/win32.c
|
||||
- Altered the prototypes of win32_*() so their argument types didn't conflict
|
||||
with the function definitions.
|
||||
- Casted types of win32_* to void inside win32ops so that it didn't conflict
|
||||
with the definition of eventops (gcc doesn't like this)
|
||||
- Altered prototype of signal_handler to be static since definition is static
|
||||
(why wasn't it like this before)
|
||||
- Casted the second argument of signal() to be void*, some reason my MinGW
|
||||
doesn't have sighandler_t typedef'ed.
|
||||
|
||||
* configure.in
|
||||
- some code to check if we are compiling for WIN32.
|
||||
|
||||
* Makefile.am
|
||||
- if BUILD_WIN32 is defined, include WIN32-Code/misc.c and
|
||||
WIN32-Code/win32.c as source files.
|
||||
- if WIN32, do not build test stuff. (not windows friendly)
|
||||
- if WIN32, explicitly link to ws2_32.dll
|
||||
|
||||
Notes
|
||||
-----
|
||||
- We assume that if __GNUC__ is undefined we are building with MSVC
|
||||
- If the user wishes to build a dll, they are on their own, the syntax is
|
||||
compiler specific.
|
||||
- Getting this warning from libtool, no idea why
|
||||
"libtool: link: warning: undefined symbols not allowed in i686-pc-mingw32
|
||||
shared libraries"
|
||||
|
||||
|
||||
Changes related to "custom eventops"
|
||||
====================================
|
||||
|
||||
* configure.in
|
||||
- add argument --enable-custom-eventops, sets USE_CUSTOM_EVENTOPS in config.h
|
||||
- add argument --enable-custom-code, sets USE_CUSTOM_CODE in Makefile
|
||||
|
||||
* Makefile.am
|
||||
- if USE_CUSTOM_CODE, include custom/custom.c as a source file.
|
||||
(I can't think of a way to pass a string to Makefile.am, so I'm stuck naming
|
||||
the new source file custom.c. It just seems simpler this way, but I'm open
|
||||
to suggestions)
|
||||
|
||||
* event.c
|
||||
- if USE_CUSTOM_EVENTOPS, use eventops as defined in custom-eventops.h
|
||||
|
||||
Notes
|
||||
-----
|
||||
Just in case it isn't completely obvious, the goal of "custom eventops" is to
|
||||
allow the user to include their own event processing system without requiring a
|
||||
fork. This is accomplished through two parts. Firstly, by allowing the user to
|
||||
redefine eventops. (for example, the user may wish to use epoll() exclusively).
|
||||
Secondly, by allowing the user to include their own code to support a private
|
||||
eventop (note, this may not be necessary, as the user may choose to include
|
||||
already defined eventop's.
|
||||
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
The current SVN version of Tor should compile with MinGW.
|
||||
|
||||
OpenSSL and libz both compile on MinGW out of the box.
|
||||
|
||||
libevent 1.1b will not build unless you apply the diff in this directory.
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,338 @@
|
|||
Only in libevent-1.1b: CHANGES
|
||||
Only in libevent-1.1b: Makefile
|
||||
diff -uwr libevent-1.1b-old/Makefile.am libevent-1.1b/Makefile.am
|
||||
--- libevent-1.1b-old/Makefile.am Wed Aug 9 22:16:35 2006
|
||||
+++ libevent-1.1b/Makefile.am Sat Sep 2 03:49:26 2006
|
||||
@@ -1,6 +1,5 @@
|
||||
AUTOMAKE_OPTIONS = foreign no-dependencies
|
||||
|
||||
-SUBDIRS = . sample test
|
||||
|
||||
EXTRA_DIST = acconfig.h event.h event-internal.h log.h evsignal.h event.3 \
|
||||
kqueue.c epoll_sub.c epoll.c select.c rtsig.c poll.c signal.c \
|
||||
@@ -20,8 +19,29 @@
|
||||
|
||||
lib_LTLIBRARIES = libevent.la
|
||||
|
||||
-libevent_la_SOURCES = event.c buffer.c evbuffer.c log.c
|
||||
-libevent_la_LIBADD = @LTLIBOBJS@
|
||||
+
|
||||
+if BUILD_WIN32
|
||||
+
|
||||
+SUBDIRS = . sample
|
||||
+SYS_LIBS = -lws2_32
|
||||
+SYS_SRC = WIN32-Code/misc.c WIN32-Code/win32.c
|
||||
+
|
||||
+else
|
||||
+
|
||||
+SUBDIRS = . sample test
|
||||
+SYS_LIBS =
|
||||
+SYS_SRC =
|
||||
+
|
||||
+endif
|
||||
+
|
||||
+if USE_CUSTOM_CODE
|
||||
+CUST_SRC = custom/custom.c
|
||||
+else
|
||||
+CUST_SRC =
|
||||
+endif
|
||||
+
|
||||
+libevent_la_SOURCES = event.c buffer.c evbuffer.c log.c $(CUST_SRC) $(SYS_SRC)
|
||||
+libevent_la_LIBADD = @LTLIBOBJS@ $(SYS_LIBS)
|
||||
libevent_la_LDFLAGS = -release @VERSION@ -version-info 1:2:0
|
||||
|
||||
include_HEADERS = event.h
|
||||
Only in libevent-1.1b: Makefile.in
|
||||
diff -uwr libevent-1.1b-old/WIN32-Code/misc.c libevent-1.1b/WIN32-Code/misc.c
|
||||
--- libevent-1.1b-old/WIN32-Code/misc.c Wed Aug 9 21:01:14 2006
|
||||
+++ libevent-1.1b/WIN32-Code/misc.c Fri Sep 1 22:21:31 2006
|
||||
@@ -4,6 +4,12 @@
|
||||
#include <sys/timeb.h>
|
||||
#include <time.h>
|
||||
|
||||
+#ifdef __GNUC__
|
||||
+/*our prototypes for timeval and timezone are in here, just in case the above
|
||||
+ headers don't have them*/
|
||||
+#include "misc.h"
|
||||
+#endif
|
||||
+
|
||||
/****************************************************************************
|
||||
*
|
||||
* Function: gettimeofday(struct timeval *, struct timezone *)
|
||||
diff -uwr libevent-1.1b-old/WIN32-Code/misc.h libevent-1.1b/WIN32-Code/misc.h
|
||||
--- libevent-1.1b-old/WIN32-Code/misc.h Wed Aug 9 21:01:14 2006
|
||||
+++ libevent-1.1b/WIN32-Code/misc.h Fri Sep 1 18:47:09 2006
|
||||
@@ -1,6 +1,9 @@
|
||||
#ifndef MISC_H
|
||||
#define MISC_H
|
||||
|
||||
+struct timezone;
|
||||
+struct timeval;
|
||||
+
|
||||
int gettimeofday(struct timeval *,struct timezone *);
|
||||
|
||||
#endif
|
||||
diff -uwr libevent-1.1b-old/WIN32-Code/win32.c libevent-1.1b/WIN32-Code/win32.c
|
||||
--- libevent-1.1b-old/WIN32-Code/win32.c Wed Aug 9 21:25:48 2006
|
||||
+++ libevent-1.1b/WIN32-Code/win32.c Sat Sep 2 00:45:55 2006
|
||||
@@ -60,7 +60,8 @@
|
||||
/* MSDN says this is required to handle SIGFPE */
|
||||
volatile double SIGFPE_REQ = 0.0f;
|
||||
|
||||
-int signal_handler(int sig);
|
||||
+static int signal_handler(int sig);
|
||||
+
|
||||
void signal_process(void);
|
||||
int signal_recalc(void);
|
||||
|
||||
@@ -77,20 +78,21 @@
|
||||
};
|
||||
|
||||
void *win32_init (void);
|
||||
-int win32_insert (void *, struct event *);
|
||||
-int win32_del (void *, struct event *);
|
||||
+int win32_insert (struct win32op *, struct event *);
|
||||
+int win32_del (struct win32op *, struct event *);
|
||||
int win32_recalc (struct event_base *base, void *, int);
|
||||
-int win32_dispatch (struct event_base *base, void *, struct timeval *);
|
||||
+int win32_dispatch (struct event_base *base, struct win32op *, struct timeval *);
|
||||
|
||||
struct eventop win32ops = {
|
||||
"win32",
|
||||
win32_init,
|
||||
- win32_insert,
|
||||
- win32_del,
|
||||
+ (int (*) (void*, struct event*)) win32_insert,
|
||||
+ (int (*) (void*, struct event*)) win32_del,
|
||||
win32_recalc,
|
||||
- win32_dispatch
|
||||
+ (int (*) (struct event_base*, void*, struct timeval*)) win32_dispatch
|
||||
};
|
||||
|
||||
+
|
||||
#define FD_SET_ALLOC_SIZE(n) ((sizeof(struct win_fd_set) + ((n)-1)*sizeof(SOCKET)))
|
||||
|
||||
static int
|
||||
@@ -213,7 +215,13 @@
|
||||
if (ev->ev_events & (EV_READ|EV_WRITE))
|
||||
event_errx(1, "%s: EV_SIGNAL incompatible use",
|
||||
__func__);
|
||||
+
|
||||
+#ifndef __GNUC__
|
||||
if((int)signal(EVENT_SIGNAL(ev), signal_handler) == -1)
|
||||
+#else
|
||||
+ if((int)signal(EVENT_SIGNAL(ev), (void*) signal_handler) == -1)
|
||||
+#endif
|
||||
+
|
||||
return (-1);
|
||||
|
||||
return (0);
|
||||
@@ -382,8 +390,13 @@
|
||||
|
||||
/* Reinstall our signal handler. */
|
||||
TAILQ_FOREACH(ev, &signalqueue, ev_signal_next) {
|
||||
+#ifndef __GNUC__
|
||||
if((int)signal(EVENT_SIGNAL(ev), signal_handler) == -1)
|
||||
+#else
|
||||
+ if((int)signal(EVENT_SIGNAL(ev), (void*) signal_handler) == -1)
|
||||
+#endif
|
||||
return (-1);
|
||||
+
|
||||
}
|
||||
return (0);
|
||||
}
|
||||
Only in libevent-1.1b-old/: aclocal.m4
|
||||
Only in libevent-1.1b: autom4te.cache
|
||||
diff -uwr libevent-1.1b-old/buffer.c libevent-1.1b/buffer.c
|
||||
--- libevent-1.1b-old/buffer.c Wed Aug 9 22:01:40 2006
|
||||
+++ libevent-1.1b/buffer.c Fri Sep 1 18:52:56 2006
|
||||
@@ -197,7 +197,7 @@
|
||||
u_char *data = EVBUFFER_DATA(buffer);
|
||||
size_t len = EVBUFFER_LENGTH(buffer);
|
||||
char *line;
|
||||
- u_int i;
|
||||
+ unsigned int i;
|
||||
|
||||
for (i = 0; i < len; i++) {
|
||||
if (data[i] == '\r' || data[i] == '\n')
|
||||
Only in libevent-1.1b: config.guess
|
||||
Only in libevent-1.1b: config.h
|
||||
diff -uwr libevent-1.1b-old/config.h.in libevent-1.1b/config.h.in
|
||||
--- libevent-1.1b-old/config.h.in Wed Aug 9 21:27:37 2006
|
||||
+++ libevent-1.1b/config.h.in Sat Sep 2 02:23:17 2006
|
||||
@@ -223,6 +223,9 @@
|
||||
/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
|
||||
#undef TIME_WITH_SYS_TIME
|
||||
|
||||
+/* Define to 1 if you want to use a custom eventops variable */
|
||||
+#undef USE_CUSTOM_EVENTOPS
|
||||
+
|
||||
/* Version number of package */
|
||||
#undef VERSION
|
||||
|
||||
@@ -232,11 +235,9 @@
|
||||
/* Define to empty if `const' does not conform to ANSI C. */
|
||||
#undef const
|
||||
|
||||
-/* Define to `__inline__' or `__inline' if that's what the C compiler
|
||||
- calls it, or to nothing if 'inline' is not supported under any name. */
|
||||
-#ifndef __cplusplus
|
||||
+/* Define as `__inline' if that's what the C compiler calls it, or to nothing
|
||||
+ if it is not supported. */
|
||||
#undef inline
|
||||
-#endif
|
||||
|
||||
/* Define to `int' if <sys/types.h> does not define. */
|
||||
#undef pid_t
|
||||
Only in libevent-1.1b: config.h.in~
|
||||
Only in libevent-1.1b: config.log
|
||||
Only in libevent-1.1b: config.status
|
||||
Only in libevent-1.1b: configure
|
||||
diff -uwr libevent-1.1b-old/configure.in libevent-1.1b/configure.in
|
||||
--- libevent-1.1b-old/configure.in Wed Aug 9 22:05:17 2006
|
||||
+++ libevent-1.1b/configure.in Sat Sep 2 03:40:15 2006
|
||||
@@ -21,6 +21,18 @@
|
||||
CFLAGS="$CFLAGS -Wall"
|
||||
fi
|
||||
|
||||
+AC_ARG_ENABLE(custom-eventops,
|
||||
+ [ --enable-custom-eventops Use custom eventops variable],
|
||||
+ AC_DEFINE([USE_CUSTOM_EVENTOPS],[1],
|
||||
+ [Define to 1 to use a custom eventops variable])
|
||||
+ ,)
|
||||
+AC_ARG_ENABLE(custom-code,
|
||||
+ [ --enable-custom-code Use custom code from custom/],
|
||||
+ customcodev=true,
|
||||
+ customcodev=false)
|
||||
+
|
||||
+AM_CONDITIONAL(USE_CUSTOM_CODE, test x$customcodev = xtrue)
|
||||
+
|
||||
AC_PROG_LIBTOOL
|
||||
|
||||
dnl Uncomment "AC_DISABLE_SHARED" to make shared librraries not get
|
||||
@@ -110,6 +122,22 @@
|
||||
AC_MSG_RESULT(yes)] ,AC_MSG_RESULT(no)
|
||||
)
|
||||
fi
|
||||
+
|
||||
+dnl - check if the macro WIN32 is defined on this compiler.
|
||||
+dnl - (this is how we check for a windows version of GCC)
|
||||
+AC_MSG_CHECKING(for WIN32)
|
||||
+AC_TRY_COMPILE(,
|
||||
+ [
|
||||
+ #ifndef WIN32
|
||||
+ #error
|
||||
+ #endif
|
||||
+ ],
|
||||
+ bwin32=true; AC_MSG_RESULT(yes),
|
||||
+ bwin32=false; AC_MSG_RESULT(no),
|
||||
+)
|
||||
+
|
||||
+AM_CONDITIONAL(BUILD_WIN32, test x$bwin32 = xtrue)
|
||||
+
|
||||
|
||||
dnl Checks for typedefs, structures, and compiler characteristics.
|
||||
AC_C_CONST
|
||||
diff -uwr libevent-1.1b-old/evbuffer.c libevent-1.1b/evbuffer.c
|
||||
--- libevent-1.1b-old/evbuffer.c Wed Aug 9 21:01:14 2006
|
||||
+++ libevent-1.1b/evbuffer.c Fri Sep 1 19:18:13 2006
|
||||
@@ -154,12 +154,20 @@
|
||||
if (EVBUFFER_LENGTH(bufev->output)) {
|
||||
res = evbuffer_write(bufev->output, fd);
|
||||
if (res == -1) {
|
||||
+#ifndef WIN32
|
||||
+/*todo. evbuffer uses WriteFile when WIN32 is set. WIN32 system calls do not
|
||||
+ *set errno. thus this error checking is not portable*/
|
||||
if (errno == EAGAIN ||
|
||||
errno == EINTR ||
|
||||
errno == EINPROGRESS)
|
||||
goto reschedule;
|
||||
/* error case */
|
||||
what |= EVBUFFER_ERROR;
|
||||
+
|
||||
+#else
|
||||
+ goto reschedule;
|
||||
+#endif
|
||||
+
|
||||
} else if (res == 0) {
|
||||
/* eof case */
|
||||
what |= EVBUFFER_EOF;
|
||||
@@ -181,6 +189,7 @@
|
||||
return;
|
||||
|
||||
reschedule:
|
||||
+
|
||||
if (EVBUFFER_LENGTH(bufev->output) != 0)
|
||||
bufferevent_add(&bufev->ev_write, bufev->timeout_write);
|
||||
return;
|
||||
diff -uwr libevent-1.1b-old/event.c libevent-1.1b/event.c
|
||||
--- libevent-1.1b-old/event.c Wed Aug 9 21:25:48 2006
|
||||
+++ libevent-1.1b/event.c Sat Sep 2 04:22:05 2006
|
||||
@@ -30,8 +30,14 @@
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#include <windows.h>
|
||||
#undef WIN32_LEAN_AND_MEAN
|
||||
+
|
||||
+#ifdef __GNUC__
|
||||
+#include "WIN32-Code/misc.h"
|
||||
+#else
|
||||
#include "misc.h"
|
||||
#endif
|
||||
+
|
||||
+#endif
|
||||
#include <sys/types.h>
|
||||
#include <sys/tree.h>
|
||||
#ifdef HAVE_SYS_TIME_H
|
||||
@@ -53,6 +59,7 @@
|
||||
#include "event-internal.h"
|
||||
#include "log.h"
|
||||
|
||||
+
|
||||
#ifdef HAVE_SELECT
|
||||
extern const struct eventop selectops;
|
||||
#endif
|
||||
@@ -75,6 +82,8 @@
|
||||
extern const struct eventop win32ops;
|
||||
#endif
|
||||
|
||||
+#ifndef USE_CUSTOM_EVENTOPS
|
||||
+
|
||||
/* In order of preference */
|
||||
const struct eventop *eventops[] = {
|
||||
#ifdef HAVE_WORKING_KQUEUE
|
||||
@@ -101,6 +110,11 @@
|
||||
NULL
|
||||
};
|
||||
|
||||
+#else
|
||||
+#include "custom-eventops.h"
|
||||
+#endif //USE_CUSTOM_EVENTOPS
|
||||
+
|
||||
+
|
||||
/* Global state */
|
||||
struct event_list signalqueue;
|
||||
|
||||
Only in libevent-1.1b: libtool
|
||||
diff -uwr libevent-1.1b-old/log.c libevent-1.1b/log.c
|
||||
--- libevent-1.1b-old/log.c Wed Aug 9 21:01:14 2006
|
||||
+++ libevent-1.1b/log.c Fri Sep 1 19:09:45 2006
|
||||
@@ -45,8 +45,14 @@
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#include <windows.h>
|
||||
#undef WIN32_LEAN_AND_MEAN
|
||||
+
|
||||
+#ifdef __GNUC__
|
||||
+#include "WIN32-Code/misc.h"
|
||||
+#else
|
||||
#include "misc.h"
|
||||
#endif
|
||||
+
|
||||
+#endif
|
||||
#include <sys/types.h>
|
||||
#include <sys/tree.h>
|
||||
#ifdef HAVE_SYS_TIME_H
|
||||
Only in libevent-1.1b/sample: Makefile
|
||||
Only in libevent-1.1b/sample: Makefile.in
|
||||
Only in libevent-1.1b: stamp-h1
|
||||
Only in libevent-1.1b/test: Makefile
|
||||
Only in libevent-1.1b/test: Makefile.in
|
|
@ -0,0 +1,221 @@
|
|||
=== Makefile.am
|
||||
==================================================================
|
||||
--- Makefile.am (revision 8794)
|
||||
+++ Makefile.am (local)
|
||||
@@ -1,6 +1,5 @@
|
||||
AUTOMAKE_OPTIONS = foreign no-dependencies
|
||||
|
||||
-SUBDIRS = . sample test
|
||||
|
||||
EXTRA_DIST = acconfig.h event.h event-internal.h log.h evsignal.h event.3 \
|
||||
kqueue.c epoll_sub.c epoll.c select.c rtsig.c poll.c signal.c \
|
||||
@@ -20,13 +19,29 @@
|
||||
|
||||
lib_LTLIBRARIES = libevent.la
|
||||
|
||||
-libevent_la_SOURCES = event.c buffer.c evbuffer.c log.c
|
||||
-libevent_la_LIBADD = @LTLIBOBJS@
|
||||
+if BUILD_WIN32
|
||||
+
|
||||
+SUBDIRS = . sample
|
||||
+SYS_LIBS = -lws2_32
|
||||
+SYS_SRC = WIN32-Code/misc.c WIN32-Code/win32.c
|
||||
+SYS_INCLUDES = -IWIN32-Code
|
||||
+
|
||||
+else
|
||||
+
|
||||
+SUBDIRS = . sample test
|
||||
+SYS_LIBS =
|
||||
+SYS_SRC =
|
||||
+SYS_INCLUDES =
|
||||
+
|
||||
+endif
|
||||
+
|
||||
+libevent_la_SOURCES = event.c buffer.c evbuffer.c log.c $(SYS_SRC)
|
||||
+libevent_la_LIBADD = @LTLIBOBJS@ $(SYS_LIBS)
|
||||
libevent_la_LDFLAGS = -release @VERSION@ -version-info 1:2:0
|
||||
|
||||
include_HEADERS = event.h
|
||||
|
||||
-INCLUDES = -Icompat
|
||||
+INCLUDES = -Icompat $(SYS_INCLUDES)
|
||||
|
||||
man_MANS = event.3
|
||||
|
||||
=== WIN32-Code/misc.c
|
||||
==================================================================
|
||||
--- WIN32-Code/misc.c (revision 8794)
|
||||
+++ WIN32-Code/misc.c (local)
|
||||
@@ -4,6 +4,12 @@
|
||||
#include <sys/timeb.h>
|
||||
#include <time.h>
|
||||
|
||||
+#ifdef __GNUC__
|
||||
+/*our prototypes for timeval and timezone are in here, just in case the above
|
||||
+ headers don't have them*/
|
||||
+#include "misc.h"
|
||||
+#endif
|
||||
+
|
||||
/****************************************************************************
|
||||
*
|
||||
* Function: gettimeofday(struct timeval *, struct timezone *)
|
||||
@@ -17,6 +23,7 @@
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
+#ifndef HAVE_GETTIMEOFDAY
|
||||
int gettimeofday(struct timeval *tv, struct timezone *tz) {
|
||||
struct _timeb tb;
|
||||
|
||||
@@ -28,6 +35,7 @@
|
||||
tv->tv_usec = ((int) tb.millitm) * 1000;
|
||||
return 0;
|
||||
}
|
||||
+#endif
|
||||
|
||||
int
|
||||
win_read(int fd, void *buf, unsigned int length)
|
||||
=== WIN32-Code/misc.h
|
||||
==================================================================
|
||||
--- WIN32-Code/misc.h (revision 8794)
|
||||
+++ WIN32-Code/misc.h (local)
|
||||
@@ -1,6 +1,11 @@
|
||||
#ifndef MISC_H
|
||||
#define MISC_H
|
||||
|
||||
+struct timezone;
|
||||
+struct timeval;
|
||||
+
|
||||
+#ifndef HAVE_GETTIMEOFDAY
|
||||
int gettimeofday(struct timeval *,struct timezone *);
|
||||
+#endif
|
||||
|
||||
#endif
|
||||
=== WIN32-Code/win32.c
|
||||
==================================================================
|
||||
--- WIN32-Code/win32.c (revision 8794)
|
||||
+++ WIN32-Code/win32.c (local)
|
||||
@@ -60,7 +60,8 @@
|
||||
/* MSDN says this is required to handle SIGFPE */
|
||||
volatile double SIGFPE_REQ = 0.0f;
|
||||
|
||||
-int signal_handler(int sig);
|
||||
+static void signal_handler(int sig);
|
||||
+
|
||||
void signal_process(void);
|
||||
int signal_recalc(void);
|
||||
|
||||
@@ -205,8 +206,9 @@
|
||||
}
|
||||
|
||||
int
|
||||
-win32_insert(struct win32op *win32op, struct event *ev)
|
||||
+win32_insert(void *op, struct event *ev)
|
||||
{
|
||||
+ struct win32op *win32op = op;
|
||||
int i;
|
||||
|
||||
if (ev->ev_events & EV_SIGNAL) {
|
||||
@@ -251,8 +253,9 @@
|
||||
}
|
||||
|
||||
int
|
||||
-win32_del(struct win32op *win32op, struct event *ev)
|
||||
+win32_del(void *op, struct event *ev)
|
||||
{
|
||||
+ struct win32op *win32op = op;
|
||||
int i, found;
|
||||
|
||||
if (ev->ev_events & EV_SIGNAL)
|
||||
@@ -302,9 +305,10 @@
|
||||
*/
|
||||
|
||||
int
|
||||
-win32_dispatch(struct event_base *base, struct win32op *win32op,
|
||||
+win32_dispatch(struct event_base *base, void *op,
|
||||
struct timeval *tv)
|
||||
{
|
||||
+ struct win32op *win32op = op;
|
||||
int res = 0;
|
||||
int i;
|
||||
int fd_count;
|
||||
@@ -366,13 +370,11 @@
|
||||
}
|
||||
|
||||
|
||||
-static int
|
||||
+static void
|
||||
signal_handler(int sig)
|
||||
{
|
||||
evsigcaught[sig]++;
|
||||
signal_caught = 1;
|
||||
-
|
||||
- return 0;
|
||||
}
|
||||
|
||||
int
|
||||
=== buffer.c
|
||||
==================================================================
|
||||
--- buffer.c (revision 8794)
|
||||
+++ buffer.c (local)
|
||||
@@ -197,7 +197,7 @@
|
||||
u_char *data = EVBUFFER_DATA(buffer);
|
||||
size_t len = EVBUFFER_LENGTH(buffer);
|
||||
char *line;
|
||||
- u_int i;
|
||||
+ unsigned int i;
|
||||
|
||||
for (i = 0; i < len; i++) {
|
||||
if (data[i] == '\r' || data[i] == '\n')
|
||||
=== configure.in
|
||||
==================================================================
|
||||
--- configure.in (revision 8794)
|
||||
+++ configure.in (local)
|
||||
@@ -111,6 +111,21 @@
|
||||
)
|
||||
fi
|
||||
|
||||
+dnl - check if the macro WIN32 is defined on this compiler.
|
||||
+dnl - (this is how we check for a windows version of GCC)
|
||||
+AC_MSG_CHECKING(for WIN32)
|
||||
+AC_TRY_COMPILE(,
|
||||
+ [
|
||||
+ #ifndef WIN32
|
||||
+ #error
|
||||
+ #endif
|
||||
+ ],
|
||||
+ bwin32=true; AC_MSG_RESULT(yes),
|
||||
+ bwin32=false; AC_MSG_RESULT(no),
|
||||
+)
|
||||
+
|
||||
+AM_CONDITIONAL(BUILD_WIN32, test x$bwin32 = xtrue)
|
||||
+
|
||||
dnl Checks for typedefs, structures, and compiler characteristics.
|
||||
AC_C_CONST
|
||||
AC_C_INLINE
|
||||
=== evbuffer.c
|
||||
==================================================================
|
||||
--- evbuffer.c (revision 8794)
|
||||
+++ evbuffer.c (local)
|
||||
@@ -154,12 +154,20 @@
|
||||
if (EVBUFFER_LENGTH(bufev->output)) {
|
||||
res = evbuffer_write(bufev->output, fd);
|
||||
if (res == -1) {
|
||||
+#ifndef WIN32
|
||||
+/*todo. evbuffer uses WriteFile when WIN32 is set. WIN32 system calls do not
|
||||
+ *set errno. thus this error checking is not portable*/
|
||||
if (errno == EAGAIN ||
|
||||
errno == EINTR ||
|
||||
errno == EINPROGRESS)
|
||||
goto reschedule;
|
||||
/* error case */
|
||||
what |= EVBUFFER_ERROR;
|
||||
+
|
||||
+#else
|
||||
+ goto reschedule;
|
||||
+#endif
|
||||
+
|
||||
} else if (res == 0) {
|
||||
/* eof case */
|
||||
what |= EVBUFFER_EOF;
|
||||
|
|
@ -0,0 +1,210 @@
|
|||
=== Makefile.am
|
||||
==================================================================
|
||||
--- Makefile.am (revision 8794)
|
||||
+++ Makefile.am (local)
|
||||
@@ -1,6 +1,5 @@
|
||||
AUTOMAKE_OPTIONS = foreign no-dependencies
|
||||
|
||||
-SUBDIRS = . sample test
|
||||
|
||||
bin_SCRIPTS = event_rpcgen.py
|
||||
|
||||
@@ -22,18 +21,34 @@
|
||||
|
||||
lib_LTLIBRARIES = libevent.la
|
||||
|
||||
+if BUILD_WIN32
|
||||
+
|
||||
+SUBDIRS = . sample
|
||||
+SYS_LIBS = -lws2_32
|
||||
+SYS_SRC = WIN32-Code/misc.c WIN32-Code/win32.c
|
||||
+SYS_INCLUDES = -IWIN32-Code
|
||||
+
|
||||
+else
|
||||
+
|
||||
+SUBDIRS = . sample test
|
||||
+SYS_LIBS =
|
||||
+SYS_SRC =
|
||||
+SYS_INCLUDES =
|
||||
+
|
||||
+endif
|
||||
+
|
||||
libevent_la_SOURCES = event.c buffer.c evbuffer.c log.c event_tagging.c \
|
||||
- http.c evhttp.h http-internal.h evdns.c evdns.h
|
||||
-libevent_la_LIBADD = @LTLIBOBJS@
|
||||
+ http.c evhttp.h http-internal.h evdns.c evdns.h $(SYS_SRC)
|
||||
+libevent_la_LIBADD = @LTLIBOBJS@ $(SYS_LIBS)
|
||||
libevent_la_LDFLAGS = -release @VERSION@ -version-info 1:3:0
|
||||
|
||||
include_HEADERS = event.h evhttp.h evdns.h
|
||||
|
||||
-INCLUDES = -Icompat
|
||||
+INCLUDES = -Icompat $(SYS_INCLUDES)
|
||||
|
||||
man_MANS = event.3
|
||||
|
||||
verify: libevent.la
|
||||
- cd $(srcdir)/test && make verify
|
||||
+ cd $(srcdir)/test && make verify
|
||||
|
||||
DISTCLEANFILES = *~
|
||||
=== WIN32-Code/misc.c
|
||||
==================================================================
|
||||
--- WIN32-Code/misc.c (revision 8794)
|
||||
+++ WIN32-Code/misc.c (local)
|
||||
@@ -4,6 +4,12 @@
|
||||
#include <sys/timeb.h>
|
||||
#include <time.h>
|
||||
|
||||
+#ifdef __GNUC__
|
||||
+/*our prototypes for timeval and timezone are in here, just in case the above
|
||||
+ headers don't have them*/
|
||||
+#include "misc.h"
|
||||
+#endif
|
||||
+
|
||||
/****************************************************************************
|
||||
*
|
||||
* Function: gettimeofday(struct timeval *, struct timezone *)
|
||||
=== WIN32-Code/misc.h
|
||||
==================================================================
|
||||
--- WIN32-Code/misc.h (revision 8794)
|
||||
+++ WIN32-Code/misc.h (local)
|
||||
@@ -1,6 +1,9 @@
|
||||
#ifndef MISC_H
|
||||
#define MISC_H
|
||||
|
||||
+struct timezone;
|
||||
+struct timeval;
|
||||
+
|
||||
int gettimeofday(struct timeval *,struct timezone *);
|
||||
|
||||
#endif
|
||||
=== WIN32-Code/win32.c
|
||||
==================================================================
|
||||
--- WIN32-Code/win32.c (revision 8794)
|
||||
+++ WIN32-Code/win32.c (local)
|
||||
@@ -60,7 +60,8 @@
|
||||
/* MSDN says this is required to handle SIGFPE */
|
||||
volatile double SIGFPE_REQ = 0.0f;
|
||||
|
||||
-int signal_handler(int sig);
|
||||
+static void signal_handler(int sig);
|
||||
+
|
||||
void signal_process(void);
|
||||
int signal_recalc(void);
|
||||
|
||||
@@ -207,8 +208,9 @@
|
||||
}
|
||||
|
||||
int
|
||||
-win32_insert(struct win32op *win32op, struct event *ev)
|
||||
+win32_insert(void *op, struct event *ev)
|
||||
{
|
||||
+ struct win32op *win32op = op;
|
||||
int i;
|
||||
|
||||
if (ev->ev_events & EV_SIGNAL) {
|
||||
@@ -253,8 +255,9 @@
|
||||
}
|
||||
|
||||
int
|
||||
-win32_del(struct win32op *win32op, struct event *ev)
|
||||
+win32_del(void *op, struct event *ev)
|
||||
{
|
||||
+ struct win32op *win32op = op;
|
||||
int i, found;
|
||||
|
||||
if (ev->ev_events & EV_SIGNAL)
|
||||
@@ -304,9 +307,10 @@
|
||||
*/
|
||||
|
||||
int
|
||||
-win32_dispatch(struct event_base *base, struct win32op *win32op,
|
||||
+win32_dispatch(struct event_base *base, void *op,
|
||||
struct timeval *tv)
|
||||
{
|
||||
+ struct win32op *win32op = op;
|
||||
int res = 0;
|
||||
int i;
|
||||
int fd_count;
|
||||
@@ -389,13 +393,11 @@
|
||||
free(win32op);
|
||||
}
|
||||
|
||||
-static int
|
||||
+static void
|
||||
signal_handler(int sig)
|
||||
{
|
||||
evsigcaught[sig]++;
|
||||
signal_caught = 1;
|
||||
-
|
||||
- return 0;
|
||||
}
|
||||
|
||||
int
|
||||
=== buffer.c
|
||||
==================================================================
|
||||
--- buffer.c (revision 8794)
|
||||
+++ buffer.c (local)
|
||||
@@ -197,7 +197,7 @@
|
||||
u_char *data = EVBUFFER_DATA(buffer);
|
||||
size_t len = EVBUFFER_LENGTH(buffer);
|
||||
char *line;
|
||||
- u_int i;
|
||||
+ unsigned int i;
|
||||
|
||||
for (i = 0; i < len; i++) {
|
||||
if (data[i] == '\r' || data[i] == '\n')
|
||||
=== configure.in
|
||||
==================================================================
|
||||
--- configure.in (revision 8794)
|
||||
+++ configure.in (local)
|
||||
@@ -111,6 +111,22 @@
|
||||
)
|
||||
fi
|
||||
|
||||
+dnl - check if the macro WIN32 is defined on this compiler.
|
||||
+dnl - (this is how we check for a windows version of GCC)
|
||||
+AC_MSG_CHECKING(for WIN32)
|
||||
+AC_TRY_COMPILE(,
|
||||
+ [
|
||||
+ #ifndef WIN32
|
||||
+ #error
|
||||
+ #endif
|
||||
+ ],
|
||||
+ bwin32=true; AC_MSG_RESULT(yes),
|
||||
+ bwin32=false; AC_MSG_RESULT(no),
|
||||
+)
|
||||
+
|
||||
+AM_CONDITIONAL(BUILD_WIN32, test x$bwin32 = xtrue)
|
||||
+
|
||||
+
|
||||
dnl Checks for typedefs, structures, and compiler characteristics.
|
||||
AC_C_CONST
|
||||
AC_C_INLINE
|
||||
=== evbuffer.c
|
||||
==================================================================
|
||||
--- evbuffer.c (revision 8794)
|
||||
+++ evbuffer.c (local)
|
||||
@@ -163,12 +162,20 @@
|
||||
if (EVBUFFER_LENGTH(bufev->output)) {
|
||||
res = evbuffer_write(bufev->output, fd);
|
||||
if (res == -1) {
|
||||
+#ifndef WIN32
|
||||
+/*todo. evbuffer uses WriteFile when WIN32 is set. WIN32 system calls do not
|
||||
+ *set errno. thus this error checking is not portable*/
|
||||
if (errno == EAGAIN ||
|
||||
errno == EINTR ||
|
||||
errno == EINPROGRESS)
|
||||
goto reschedule;
|
||||
/* error case */
|
||||
what |= EVBUFFER_ERROR;
|
||||
+
|
||||
+#else
|
||||
+ goto reschedule;
|
||||
+#endif
|
||||
+
|
||||
} else if (res == 0) {
|
||||
/* eof case */
|
||||
what |= EVBUFFER_EOF;
|
||||
|
|
@ -0,0 +1,41 @@
|
|||
Microsoft Developer Studio Workspace File, Format Version 6.00
|
||||
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "tor"=".\tor\tor.dsp" - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "tor_resolve"=".\tor_resolve\tor_resolve.dsp" - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Global:
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<3>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
|
@ -0,0 +1,398 @@
|
|||
# Microsoft Developer Studio Project File - Name="tor" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Console Application" 0x0103
|
||||
|
||||
CFG=tor - Win32 Debug
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "tor.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "tor.mak" CFG="tor - Win32 Debug"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "tor - Win32 Release" (based on "Win32 (x86) Console Application")
|
||||
!MESSAGE "tor - Win32 Debug" (based on "Win32 (x86) Console Application")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP AllowPerConfigDependencies 0
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
CPP=cl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "tor - Win32 Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Release"
|
||||
# PROP BASE Intermediate_Dir "Release"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release"
|
||||
# PROP Intermediate_Dir "Release"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\..\..\src\win32" /I "c:\openssl\include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
|
||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib ssleay32.lib libeay32.lib /nologo /subsystem:console /machine:I386 /libpath:"c:\openssl\lib\vc"
|
||||
|
||||
!ELSEIF "$(CFG)" == "tor - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Debug"
|
||||
# PROP BASE Intermediate_Dir "Debug"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Debug"
|
||||
# PROP Intermediate_Dir "Debug"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
|
||||
# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "..\..\..\src\win32" /I "c:\openssl\include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
|
||||
# ADD LINK32 wsock32.lib ssleay32.lib libeay32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"c:\openssl\lib\vc"
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "tor - Win32 Release"
|
||||
# Name "tor - Win32 Debug"
|
||||
# Begin Group "Source Files"
|
||||
|
||||
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
|
||||
# Begin Group "common"
|
||||
|
||||
# PROP Default_Filter ""
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\src\common\aes.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\src\common\compat.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\src\common\container.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\src\common\crypto.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\src\common\log.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\src\common\log.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\src\common\torgzip.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\src\common\tortls.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\src\common\util.c
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "zlib"
|
||||
|
||||
# PROP Default_Filter ""
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\contrib\zlib\adler32.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\contrib\zlib\compress.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\contrib\zlib\crc32.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\contrib\zlib\crc32.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\contrib\zlib\deflate.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\contrib\zlib\deflate.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\contrib\zlib\gzio.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\contrib\zlib\infback.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\contrib\zlib\inffast.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\contrib\zlib\inffast.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\contrib\zlib\inffixed.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\contrib\zlib\inflate.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\contrib\zlib\inflate.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\contrib\zlib\inftrees.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\contrib\zlib\inftrees.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\contrib\zlib\trees.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\contrib\zlib\trees.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\contrib\zlib\uncompr.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\contrib\zlib\zconf.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\contrib\zlib\zlib.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\contrib\zlib\zutil.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\contrib\zlib\zutil.h
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "or"
|
||||
|
||||
# PROP Default_Filter ""
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\src\or\buffers.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\src\or\circuitbuild.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\src\or\circuitlist.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\src\or\circuituse.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\src\or\command.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\src\or\config.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\src\or\connection.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\src\or\connection_edge.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\src\or\connection_or.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\src\or\control.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\src\or\cpuworker.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\src\or\directory.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\src\or\dirserv.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\src\or\dns.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\src\or\hibernate.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\src\or\main.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\src\or\onion.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\src\or\policies.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\src\or\relay.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\src\or\rendclient.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\src\or\rendcommon.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\src\or\rendmid.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\src\or\rendservice.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\src\or\rephist.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\src\or\router.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\src\or\routerlist.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\src\or\routerparse.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\src\or\tor_main.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\src\or\tree.h
|
||||
# End Source File
|
||||
# End Group
|
||||
# End Group
|
||||
# Begin Group "Header Files"
|
||||
|
||||
# PROP Default_Filter "h;hpp;hxx;hm;inl"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\src\common\aes.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\src\common\compat.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\src\common\container.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\src\common\crypto.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\src\common\fakepoll.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\src\or\or.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\src\win32\orconfig.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\src\common\test.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\src\common\torgzip.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\src\common\torint.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\src\common\tortls.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\src\common\util.h
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Resource Files"
|
||||
|
||||
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
|
||||
# End Group
|
||||
# End Target
|
||||
# End Project
|
|
@ -0,0 +1,134 @@
|
|||
# Microsoft Developer Studio Project File - Name="tor_resolve" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Console Application" 0x0103
|
||||
|
||||
CFG=tor_resolve - Win32 Debug
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "tor_resolve.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "tor_resolve.mak" CFG="tor_resolve - Win32 Debug"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "tor_resolve - Win32 Release" (based on "Win32 (x86) Console Application")
|
||||
!MESSAGE "tor_resolve - Win32 Debug" (based on "Win32 (x86) Console Application")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP AllowPerConfigDependencies 0
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
CPP=cl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "tor_resolve - Win32 Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Release"
|
||||
# PROP BASE Intermediate_Dir "Release"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release"
|
||||
# PROP Intermediate_Dir "Release"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\..\..\src\win32" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
|
||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib /nologo /subsystem:console /machine:I386
|
||||
|
||||
!ELSEIF "$(CFG)" == "tor_resolve - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Debug"
|
||||
# PROP BASE Intermediate_Dir "Debug"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Debug"
|
||||
# PROP Intermediate_Dir "Debug"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
|
||||
# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "..\..\..\src\win32" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
|
||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "tor_resolve - Win32 Release"
|
||||
# Name "tor_resolve - Win32 Debug"
|
||||
# Begin Group "Source Files"
|
||||
|
||||
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\src\common\compat.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\src\common\log.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE="..\..\..\src\tools\tor-resolve.c"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\src\common\util.c
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Header Files"
|
||||
|
||||
# PROP Default_Filter "h;hpp;hxx;hm;inl"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\src\common\compat.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\src\common\log.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\src\win32\orconfig.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\src\common\torint.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\src\common\util.h
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Resource Files"
|
||||
|
||||
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
|
||||
# End Group
|
||||
# End Target
|
||||
# End Project
|
|
@ -0,0 +1,45 @@
|
|||
Microsoft Visual Studio Solution File, Format Version 8.00
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Tor", "Tor.vcproj", "{63A6B170-E742-400C-B3A0-9CCED3699043}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tor_resolve", "..\tor_resolve\tor_resolve.vcproj", "{E2D2762A-26BD-4A28-BD72-DDAB181324B4}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "unittests", "..\unittests\unittests.vcproj", "{F1F64693-11A9-4992-8B4B-2A67C07BD8C8}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libevent", "..\..\..\contrib\libevent\WIN32-Prj\libevent.vcproj", "{52BBFCA6-6F82-4596-BBAD-0BCFBC637B80}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfiguration) = preSolution
|
||||
Debug = Debug
|
||||
Release = Release
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfiguration) = postSolution
|
||||
{63A6B170-E742-400C-B3A0-9CCED3699043}.Debug.ActiveCfg = Debug|Win32
|
||||
{63A6B170-E742-400C-B3A0-9CCED3699043}.Debug.Build.0 = Debug|Win32
|
||||
{63A6B170-E742-400C-B3A0-9CCED3699043}.Release.ActiveCfg = Release|Win32
|
||||
{63A6B170-E742-400C-B3A0-9CCED3699043}.Release.Build.0 = Release|Win32
|
||||
{E2D2762A-26BD-4A28-BD72-DDAB181324B4}.Debug.ActiveCfg = Debug|Win32
|
||||
{E2D2762A-26BD-4A28-BD72-DDAB181324B4}.Debug.Build.0 = Debug|Win32
|
||||
{E2D2762A-26BD-4A28-BD72-DDAB181324B4}.Release.ActiveCfg = Release|Win32
|
||||
{E2D2762A-26BD-4A28-BD72-DDAB181324B4}.Release.Build.0 = Release|Win32
|
||||
{F1F64693-11A9-4992-8B4B-2A67C07BD8C8}.Debug.ActiveCfg = Debug|Win32
|
||||
{F1F64693-11A9-4992-8B4B-2A67C07BD8C8}.Debug.Build.0 = Debug|Win32
|
||||
{F1F64693-11A9-4992-8B4B-2A67C07BD8C8}.Release.ActiveCfg = Release|Win32
|
||||
{F1F64693-11A9-4992-8B4B-2A67C07BD8C8}.Release.Build.0 = Release|Win32
|
||||
{52BBFCA6-6F82-4596-BBAD-0BCFBC637B80}.Debug.ActiveCfg = Debug|Win32
|
||||
{52BBFCA6-6F82-4596-BBAD-0BCFBC637B80}.Debug.Build.0 = Debug|Win32
|
||||
{52BBFCA6-6F82-4596-BBAD-0BCFBC637B80}.Release.ActiveCfg = Release|Win32
|
||||
{52BBFCA6-6F82-4596-BBAD-0BCFBC637B80}.Release.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityAddIns) = postSolution
|
||||
EndGlobalSection
|
||||
EndGlobal
|
|
@ -0,0 +1,357 @@
|
|||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="7.10"
|
||||
Name="Tor"
|
||||
ProjectGUID="{63A6B170-E742-400C-B3A0-9CCED3699043}"
|
||||
Keyword="Win32Proj">
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"/>
|
||||
</Platforms>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="Debug"
|
||||
IntermediateDirectory="Debug"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="c:\openssl\include;..\..\..\src\win32;..\..\..\contrib\libevent"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
|
||||
IgnoreStandardIncludePath="FALSE"
|
||||
MinimalRebuild="TRUE"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="1"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="FALSE"
|
||||
DebugInformationFormat="4"
|
||||
CompileAs="1"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="wsock32.lib t:\openssl\install\lib\vc\ssleay32.lib t:\openssl\install\lib\vc\libeay32.lib ..\..\..\contrib\libevent\win32-prj\Debug\libevent.lib ws2_32.lib"
|
||||
OutputFile="$(OutDir)/Tor.exe"
|
||||
LinkIncremental="2"
|
||||
IgnoreDefaultLibraryNames="LIBCD"
|
||||
DelayLoadDLLs="advapi32.dll"
|
||||
GenerateDebugInformation="TRUE"
|
||||
ProgramDatabaseFile="$(OutDir)/Tor.pdb"
|
||||
SubSystem="1"
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
<Tool
|
||||
Name="VCManagedWrapperGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="Release"
|
||||
IntermediateDirectory="Release"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories="c:\openssl\include;..\..\..\src\win32;..\..\..\contrib\libevent"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
|
||||
IgnoreStandardIncludePath="FALSE"
|
||||
RuntimeLibrary="0"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="TRUE"
|
||||
DebugInformationFormat="3"
|
||||
CompileAs="1"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="wsock32.lib c:\openssl\lib\vc\ssleay32.lib c:\openssl\lib\vc\libeay32.lib"
|
||||
OutputFile="$(OutDir)/Tor.exe"
|
||||
LinkIncremental="1"
|
||||
DelayLoadDLLs="advapi32.dll"
|
||||
GenerateDebugInformation="TRUE"
|
||||
SubSystem="1"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
<Tool
|
||||
Name="VCManagedWrapperGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
|
||||
<File
|
||||
RelativePath="..\..\..\src\common\aes.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\or\buffers.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\or\circuitbuild.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\or\circuitlist.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\or\circuituse.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\or\command.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\common\compat.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\or\config.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\or\connection.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\or\connection_edge.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\or\connection_or.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\common\container.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\or\control.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\or\cpuworker.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\common\crypto.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\or\directory.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\or\dirserv.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\or\dns.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\or\hibernate.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\common\log.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\or\main.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\or\onion.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\or\or.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\win32\orconfig.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\or\policies.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\or\relay.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\or\rendclient.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\or\rendcommon.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\or\rendmid.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\or\rendservice.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\or\rephist.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\or\router.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\or\routerlist.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\or\routerparse.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\or\tor_main.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\common\torgzip.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\common\torint.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\common\tortls.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\common\util.c">
|
||||
</File>
|
||||
<Filter
|
||||
Name="zlib"
|
||||
Filter="">
|
||||
<File
|
||||
RelativePath="..\..\..\contrib\zlib\adler32.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\contrib\zlib\compress.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\contrib\zlib\crc32.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\contrib\zlib\crc32.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\contrib\zlib\deflate.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\contrib\zlib\deflate.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\contrib\zlib\gzio.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\contrib\zlib\infback.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\contrib\zlib\inffast.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\contrib\zlib\inffast.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\contrib\zlib\inffixed.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\contrib\zlib\inflate.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\contrib\zlib\inflate.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\contrib\zlib\inftrees.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\contrib\zlib\inftrees.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\contrib\zlib\trees.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\contrib\zlib\trees.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\contrib\zlib\uncompr.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\contrib\zlib\zconf.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\contrib\zlib\zlib.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\contrib\zlib\zutil.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\contrib\zlib\zutil.h">
|
||||
</File>
|
||||
</Filter>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
||||
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
|
||||
<File
|
||||
RelativePath="..\..\..\src\common\aes.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\common\compat.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\common\container.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\common\crypto.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\common\log.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\common\torgzip.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\common\tortls.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\or\tree.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\common\util.h">
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Resource Files"
|
||||
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
|
||||
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
|
||||
</Filter>
|
||||
<File
|
||||
RelativePath=".\ReadMe.txt">
|
||||
</File>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
|
@ -0,0 +1,169 @@
|
|||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="7.10"
|
||||
Name="tor_resolve"
|
||||
ProjectGUID="{E2D2762A-26BD-4A28-BD72-DDAB181324B4}"
|
||||
Keyword="Win32Proj">
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"/>
|
||||
</Platforms>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="Debug"
|
||||
IntermediateDirectory="Debug"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\..\..\contrib\libevent;..\..\..\src\win32"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
|
||||
MinimalRebuild="TRUE"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="1"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="FALSE"
|
||||
DebugInformationFormat="4"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="wsock32.lib ..\..\..\contrib\libevent\win32-prj\Debug\libevent.lib"
|
||||
OutputFile="$(OutDir)/tor_resolve.exe"
|
||||
LinkIncremental="2"
|
||||
GenerateDebugInformation="TRUE"
|
||||
ProgramDatabaseFile="$(OutDir)/tor_resolve.pdb"
|
||||
SubSystem="1"
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
<Tool
|
||||
Name="VCManagedWrapperGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="Release"
|
||||
IntermediateDirectory="Release"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories="..\..\..\contrib\libevent;..\..\..\src\win32"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
|
||||
RuntimeLibrary="0"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="FALSE"
|
||||
DebugInformationFormat="3"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="wsock32.lib ..\..\..\contrib\libevent\win32-prj\Debug\libevent.lib"
|
||||
OutputFile="$(OutDir)/tor_resolve.exe"
|
||||
LinkIncremental="1"
|
||||
GenerateDebugInformation="TRUE"
|
||||
SubSystem="1"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
<Tool
|
||||
Name="VCManagedWrapperGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
|
||||
<File
|
||||
RelativePath="..\..\..\src\common\compat.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\common\compat.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\common\container.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\common\container.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\common\log.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\common\log.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\win32\orconfig.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\tools\tor-resolve.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\common\torint.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\common\util.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\common\util.h">
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
||||
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Resource Files"
|
||||
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
|
||||
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
|
||||
</Filter>
|
||||
<File
|
||||
RelativePath=".\ReadMe.txt">
|
||||
</File>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
|
@ -0,0 +1,342 @@
|
|||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="7.10"
|
||||
Name="unittests"
|
||||
ProjectGUID="{F1F64693-11A9-4992-8B4B-2A67C07BD8C8}"
|
||||
Keyword="Win32Proj">
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"/>
|
||||
</Platforms>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="Debug"
|
||||
IntermediateDirectory="Debug"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\..\..\src\win32;c:\openssl\include;..\..\..\contrib\libevent"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
|
||||
MinimalRebuild="TRUE"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="1"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="FALSE"
|
||||
DebugInformationFormat="4"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="wsock32.lib t:\openssl\install\lib\vc\libeay32.lib t:\openssl\install\lib\vc\ssleay32.lib ws2_32.lib ..\..\..\contrib\libevent\win32-prj\Debug\libevent.lib"
|
||||
OutputFile="$(OutDir)/unittests.exe"
|
||||
LinkIncremental="2"
|
||||
IgnoreDefaultLibraryNames="LIBCD"
|
||||
GenerateDebugInformation="TRUE"
|
||||
ProgramDatabaseFile="$(OutDir)/unittests.pdb"
|
||||
SubSystem="1"
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
<Tool
|
||||
Name="VCManagedWrapperGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="Release"
|
||||
IntermediateDirectory="Release"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories="..\..\..\src\win32;c:\openssl\include;..\..\..\contrib\libevent"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
|
||||
RuntimeLibrary="0"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="FALSE"
|
||||
DebugInformationFormat="3"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="wsock32.lib c:\openssl\lib\vc\libeay32.lib c:\openssl\lib\vc\ssleay32.lib"
|
||||
OutputFile="$(OutDir)/unittests.exe"
|
||||
LinkIncremental="1"
|
||||
GenerateDebugInformation="TRUE"
|
||||
SubSystem="1"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
<Tool
|
||||
Name="VCManagedWrapperGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
|
||||
<File
|
||||
RelativePath="..\..\..\src\common\aes.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\or\buffers.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\or\circuitbuild.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\or\circuitlist.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\or\circuituse.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\or\command.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\common\compat.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\or\config.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\or\connection.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\or\connection_edge.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\or\connection_or.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\common\container.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\or\control.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\or\cpuworker.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\common\crypto.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\or\directory.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\or\dirserv.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\or\dns.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\or\hibernate.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\common\log.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\or\main.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\or\onion.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\or\or.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\win32\orconfig.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\or\policies.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\or\relay.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\or\rendclient.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\or\rendcommon.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\or\rendmid.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\or\rendservice.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\or\rephist.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\or\router.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\or\routerlist.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\or\routerparse.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\or\test.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\common\torgzip.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\common\torint.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\common\tortls.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\common\util.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\contrib\zlib\zutil.h">
|
||||
</File>
|
||||
<Filter
|
||||
Name="zlib">
|
||||
<File
|
||||
RelativePath="..\..\..\contrib\zlib\adler32.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\contrib\zlib\compress.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\contrib\zlib\crc32.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\contrib\zlib\crc32.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\contrib\zlib\deflate.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\contrib\zlib\deflate.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\contrib\zlib\gzio.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\contrib\zlib\infback.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\contrib\zlib\inffast.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\contrib\zlib\inffast.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\contrib\zlib\inffixed.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\contrib\zlib\inflate.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\contrib\zlib\inflate.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\contrib\zlib\inftrees.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\contrib\zlib\inftrees.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\contrib\zlib\trees.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\contrib\zlib\trees.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\contrib\zlib\uncompr.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\contrib\zlib\zconf.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\contrib\zlib\zlib.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\contrib\zlib\zutil.c">
|
||||
</File>
|
||||
</Filter>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
||||
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
|
||||
<File
|
||||
RelativePath="..\..\..\src\common\aes.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\common\compat.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\common\container.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\common\crypto.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\common\log.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\common\torgzip.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\common\tortls.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\or\tree.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\common\util.h">
|
||||
</File>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
95
acinclude.m4
95
acinclude.m4
|
@ -1,8 +1,8 @@
|
|||
dnl Helper macros for Tor configure.ac
|
||||
dnl $Id$
|
||||
dnl Helper macros for Tor configure.in
|
||||
dnl Copyright (c) 2001-2004, Roger Dingledine
|
||||
dnl Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson
|
||||
dnl Copyright (c) 2007-2008, Roger Dingledine, Nick Mathewson
|
||||
dnl Copyright (c) 2007-2017, The Tor Project, Inc.
|
||||
dnl See LICENSE for licensing information
|
||||
|
||||
AC_DEFUN([TOR_EXTEND_CODEPATH],
|
||||
|
@ -42,70 +42,6 @@ AC_DEFUN([TOR_DEFINE_CODEPATH],
|
|||
AC_SUBST(TOR_LDFLAGS_$2)
|
||||
])
|
||||
|
||||
dnl 1: flags
|
||||
dnl 2: try to link too if this is nonempty.
|
||||
dnl 3: what to do on success compiling
|
||||
dnl 4: what to do on failure compiling
|
||||
AC_DEFUN([TOR_TRY_COMPILE_WITH_CFLAGS], [
|
||||
AS_VAR_PUSHDEF([VAR],[tor_cv_cflags_$1])
|
||||
AC_CACHE_CHECK([whether the compiler accepts $1], VAR, [
|
||||
tor_saved_CFLAGS="$CFLAGS"
|
||||
CFLAGS="$CFLAGS -pedantic -Werror $1"
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
|
||||
[AS_VAR_SET(VAR,yes)],
|
||||
[AS_VAR_SET(VAR,no)])
|
||||
if test x$2 != x; then
|
||||
AS_VAR_PUSHDEF([can_link],[tor_can_link_$1])
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
|
||||
[AS_VAR_SET(can_link,yes)],
|
||||
[AS_VAR_SET(can_link,no)])
|
||||
AS_VAR_POPDEF([can_link])
|
||||
fi
|
||||
CFLAGS="$tor_saved_CFLAGS"
|
||||
])
|
||||
if test x$VAR = xyes; then
|
||||
$3
|
||||
else
|
||||
$4
|
||||
fi
|
||||
AS_VAR_POPDEF([VAR])
|
||||
])
|
||||
|
||||
dnl 1:flags
|
||||
dnl 2:also try to link (yes: non-empty string)
|
||||
dnl will set yes or no in $tor_can_link_$1 (as modified by AS_VAR_PUSHDEF)
|
||||
AC_DEFUN([TOR_CHECK_CFLAGS], [
|
||||
TOR_TRY_COMPILE_WITH_CFLAGS($1, $2, CFLAGS="$CFLAGS $1", true)
|
||||
])
|
||||
|
||||
dnl 1:flags
|
||||
dnl 2:extra ldflags
|
||||
dnl 3:extra libraries
|
||||
AC_DEFUN([TOR_CHECK_LDFLAGS], [
|
||||
AS_VAR_PUSHDEF([VAR],[tor_cv_ldflags_$1])
|
||||
AC_CACHE_CHECK([whether the linker accepts $1], VAR, [
|
||||
tor_saved_CFLAGS="$CFLAGS"
|
||||
tor_saved_LDFLAGS="$LDFLAGS"
|
||||
tor_saved_LIBS="$LIBS"
|
||||
CFLAGS="$CFLAGS -pedantic -Werror"
|
||||
LDFLAGS="$LDFLAGS $2 $1"
|
||||
LIBS="$LIBS $3"
|
||||
AC_RUN_IFELSE([AC_LANG_PROGRAM([#include <stdio.h>], [fputs("", stdout)])],
|
||||
[AS_VAR_SET(VAR,yes)],
|
||||
[AS_VAR_SET(VAR,no)],
|
||||
[AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
|
||||
[AS_VAR_SET(VAR,yes)],
|
||||
[AS_VAR_SET(VAR,no)])])
|
||||
CFLAGS="$tor_saved_CFLAGS"
|
||||
LDFLAGS="$tor_saved_LDFLAGS"
|
||||
LIBS="$tor_saved_LIBS"
|
||||
])
|
||||
if test x$VAR = xyes; then
|
||||
LDFLAGS="$LDFLAGS $1"
|
||||
fi
|
||||
AS_VAR_POPDEF([VAR])
|
||||
])
|
||||
|
||||
dnl 1:libname
|
||||
AC_DEFUN([TOR_WARN_MISSING_LIB], [
|
||||
h=""
|
||||
|
@ -113,21 +49,21 @@ if test x$2 = xdevpkg; then
|
|||
h=" headers for"
|
||||
fi
|
||||
if test -f /etc/debian_version && test x"$tor_$1_$2_debian" != x; then
|
||||
AC_MSG_WARN([On Debian, you can install$h $1 using "apt-get install $tor_$1_$2_debian"])
|
||||
AC_WARN([On Debian, you can install$h $1 using "apt-get install $tor_$1_$2_debian"])
|
||||
if test x"$tor_$1_$2_debian" != x"$tor_$1_devpkg_debian"; then
|
||||
AC_MSG_WARN([ You will probably need $tor_$1_devpkg_debian too.])
|
||||
AC_WARN([ You will probably need $tor_$1_devpkg_debian too.])
|
||||
fi
|
||||
fi
|
||||
if test -f /etc/fedora-release && test x"$tor_$1_$2_redhat" != x; then
|
||||
AC_MSG_WARN([On Fedora, you can install$h $1 using "dnf install $tor_$1_$2_redhat"])
|
||||
AC_WARN([On Fedora Core, you can install$h $1 using "yum install $tor_$1_$2_redhat"])
|
||||
if test x"$tor_$1_$2_redhat" != x"$tor_$1_devpkg_redhat"; then
|
||||
AC_MSG_WARN([ You will probably need to install $tor_$1_devpkg_redhat too.])
|
||||
AC_WARN([ You will probably need to install $tor_$1_devpkg_redhat too.])
|
||||
fi
|
||||
else
|
||||
if test -f /etc/redhat-release && test x"$tor_$1_$2_redhat" != x; then
|
||||
AC_MSG_WARN([On most Redhat-based systems, you can get$h $1 by installing the $tor_$1_$2_redhat RPM package])
|
||||
AC_WARN([On most Redhat-based systems, you can get$h $1 by installing the $tor_$1_$2_redhat" RPM package])
|
||||
if test x"$tor_$1_$2_redhat" != x"$tor_$1_devpkg_redhat"; then
|
||||
AC_MSG_WARN([ You will probably need to install $tor_$1_devpkg_redhat too.])
|
||||
AC_WARN([ You will probably need to install $tor_$1_devpkg_redhat too.])
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
@ -147,7 +83,7 @@ dnl
|
|||
AC_DEFUN([TOR_SEARCH_LIBRARY], [
|
||||
try$1dir=""
|
||||
AC_ARG_WITH($1-dir,
|
||||
AS_HELP_STRING(--with-$1-dir=PATH, [specify path to $1 installation]),
|
||||
[ --with-$1-dir=PATH Specify path to $1 installation ],
|
||||
[
|
||||
if test x$withval != xno ; then
|
||||
try$1dir="$withval"
|
||||
|
@ -186,13 +122,13 @@ AC_CACHE_CHECK([for $1 directory], tor_cv_library_$1_dir, [
|
|||
|
||||
# Can we link against (but not necessarily run, or find the headers for)
|
||||
# the binary?
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([$5], [$6])],
|
||||
AC_LINK_IFELSE(AC_LANG_PROGRAM([$5], [$6]),
|
||||
[linkable=yes], [linkable=no])
|
||||
|
||||
if test "$linkable" = yes; then
|
||||
tor_$1_any_linkable=yes
|
||||
# Okay, we can link against it. Can we find the headers?
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([$4], [$6])],
|
||||
AC_COMPILE_IFELSE(AC_LANG_PROGRAM([$4], [$6]),
|
||||
[buildable=yes], [buildable=no])
|
||||
if test "$buildable" = yes; then
|
||||
tor_cv_library_$1_dir=$tor_trydir
|
||||
|
@ -244,11 +180,8 @@ if test "$cross_compiling" != yes; then
|
|||
else
|
||||
LDFLAGS="$tor_tryextra $orig_LDFLAGS"
|
||||
fi
|
||||
AC_RUN_IFELSE([AC_LANG_PROGRAM([$5], [$6])],
|
||||
[runnable=yes], [runnable=no],
|
||||
[AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
|
||||
[runnable=yes],
|
||||
[runnable=no])])
|
||||
AC_RUN_IFELSE(AC_LANG_PROGRAM([$5], [$6]),
|
||||
[runnable=yes], [runnable=no])
|
||||
if test "$runnable" = yes; then
|
||||
tor_cv_library_$1_linker_option=$tor_tryextra
|
||||
break
|
||||
|
@ -279,7 +212,7 @@ dnl
|
|||
dnl TOR_CHECK_PROTYPE(1:functionname, 2:macroname, 2: includes)
|
||||
AC_DEFUN([TOR_CHECK_PROTOTYPE], [
|
||||
AC_CACHE_CHECK([for declaration of $1], tor_cv_$1_declared, [
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([$3],[void *ptr= $1 ;])],
|
||||
AC_COMPILE_IFELSE(AC_LANG_PROGRAM([$3],[void *ptr= $1 ;]),
|
||||
tor_cv_$1_declared=yes,tor_cv_$1_declared=no)])
|
||||
if test x$tor_cv_$1_declared != xno ; then
|
||||
AC_DEFINE($2, 1,
|
||||
|
|
16
autogen.sh
16
autogen.sh
|
@ -1,23 +1,9 @@
|
|||
#!/bin/sh
|
||||
|
||||
if [ -x "`which autoreconf 2>/dev/null`" ] ; then
|
||||
opt="-i -f -W all,error"
|
||||
|
||||
for i in $@; do
|
||||
case "$i" in
|
||||
-v)
|
||||
opt="${opt} -v"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
exec autoreconf $opt
|
||||
fi
|
||||
|
||||
set -e
|
||||
|
||||
# Run this to generate all the initial makefiles, etc.
|
||||
aclocal -I m4 && \
|
||||
aclocal && \
|
||||
autoheader && \
|
||||
autoconf && \
|
||||
automake --add-missing --copy
|
||||
|
|
|
@ -1,37 +0,0 @@
|
|||
This file is here to keep git from removing the changes directory when
|
||||
all the changes files have been merged.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
"I'm Nobody! Who are you?
|
||||
Are you--Nobody--too?
|
||||
Then there's a pair of us!
|
||||
Don’t tell! they'd advertise--you know!
|
||||
|
||||
How dreary--to be--Somebody!
|
||||
How public--like a Frog--
|
||||
To tell one's name--the livelong June--
|
||||
To an admiring Bog!"
|
||||
-- Emily Dickinson
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
o Major bugfixes (security, directory authority, denial-of-service):
|
||||
- Fix a bug that could have allowed an attacker to force a
|
||||
directory authority to use up all its RAM by passing it a
|
||||
maliciously crafted protocol versions string. Fixes bug 25517;
|
||||
bugfix on 0.2.9.4-alpha. This issue is also tracked as
|
||||
TROVE-2018-005.
|
|
@ -1,3 +0,0 @@
|
|||
o Minor bugfixes (onion services):
|
||||
- Fix a bug that blocked the creation of ephemeral v3 onion services. Fixes
|
||||
bug 25939; bugfix on 0.3.4.1-alpha.
|
|
@ -1,5 +0,0 @@
|
|||
o Minor bugfixes (test coverage tools):
|
||||
- Update our "cov-diff" script to handle output from the latest
|
||||
version of gcov, and to remove extraneous timestamp information
|
||||
from its output. Fixes bugs 26101 and 26102; bugfix on
|
||||
0.2.5.1-alpha.
|
|
@ -1,7 +0,0 @@
|
|||
o Minor bugfixes (compatibility, openssl):
|
||||
- Work around a change in OpenSSL 1.1.1 where
|
||||
return values that would previously indicate "no password" now
|
||||
indicate an empty password. Without this workaround, Tor instances
|
||||
running with OpenSSL 1.1.1 would accept descriptors that other Tor
|
||||
instances would reject. Fixes bug 26116; bugfix on 0.2.5.16.
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
o Minor bugfixes (controller):
|
||||
- Improve accuracy of the BUILDTIMEOUT_SET control port event's
|
||||
TIMEOUT_RATE and CLOSE_RATE fields. (We were previously miscounting
|
||||
the total number of circuits for these field values.) Fixes bug
|
||||
26121; bugfix on 0.3.3.1-alpha.
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
o Minor bugfixes (compilation):
|
||||
- Fix compilation when building with OpenSSL 1.1.0 with the
|
||||
"no-deprecated" flag enabled. Fixes bug 26156; bugfix on 0.3.4.1-alpha.
|
|
@ -1,4 +0,0 @@
|
|||
o Minor bugfixes (hardening):
|
||||
- Prevent a possible out-of-bounds smartlist read in
|
||||
protover_compute_vote(). Fixes bug 26196; bugfix on
|
||||
0.2.9.4-alpha.
|
|
@ -1,4 +0,0 @@
|
|||
o Minor bugfixes (control port):
|
||||
- Do not count 0-length RELAY_COMMAND_DATA cells as valid data in CIRC_BW
|
||||
events. Previously, such cells were counted entirely in the OVERHEAD
|
||||
field. Now they are not. Fixes bug 26259; bugfix on 0.3.4.1-alpha.
|
|
@ -0,0 +1,9 @@
|
|||
- Feature removal:
|
||||
- When sending or relaying a RELAY_EARLY cell, we used to convert
|
||||
it to a RELAY cell if the connection was using the v1 link
|
||||
protocol. This was a workaround for older versions of Tor, which
|
||||
didn't handle RELAY_EARLY cells properly. Now that all supported
|
||||
versions can handle RELAY_EARLY cells, and now that we're
|
||||
enforcing the "no RELAY_EXTEND commands except in RELAY_EARLY
|
||||
cells" rule, we're removing this workaround. Addresses bug 4786.
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
o Documentation:
|
||||
- In code comment, point the reader to the exact section
|
||||
in Tor specification that specifies circuit close error
|
||||
code values. Resolves ticket 25237.
|
|
@ -0,0 +1,3 @@
|
|||
o Minor features:
|
||||
- Update to the January 3 2012 Maxmind GeoLite Country database.
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
o Minor features (continuous integration):
|
||||
- Add the necessary configuration files for continuous integration
|
||||
testing on Windows, via the Appveyor platform. Closes ticket 25549.
|
||||
Patches from Marcin Cieślak and Isis Lovecruft.
|
2308
configure.ac
2308
configure.ac
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,893 @@
|
|||
dnl $Id$
|
||||
dnl Copyright (c) 2001-2004, Roger Dingledine
|
||||
dnl Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson
|
||||
dnl Copyright (c) 2007-2008, The Tor Project, Inc.
|
||||
dnl See LICENSE for licensing information
|
||||
|
||||
AC_INIT
|
||||
AM_INIT_AUTOMAKE(tor, 0.2.1.32)
|
||||
AM_CONFIG_HEADER(orconfig.h)
|
||||
|
||||
AC_CANONICAL_HOST
|
||||
|
||||
if test -f /etc/redhat-release ; then
|
||||
if test -f /usr/kerberos/include ; then
|
||||
CPPFLAGS="$CPPFLAGS -I/usr/kerberos/include"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Not a no-op; we want to make sure that CPPFLAGS is set before we use
|
||||
# the += operator on it in src/or/Makefile.am
|
||||
CPPFLAGS="$CPPFLAGS -I\${top_srcdir}/src/common"
|
||||
|
||||
AC_ARG_ENABLE(debug,
|
||||
AS_HELP_STRING(--enable-debug, compile with debugging info),
|
||||
[if test x$enableval = xyes; then
|
||||
CFLAGS="$CFLAGS -g"
|
||||
fi])
|
||||
|
||||
#XXXX ideally, we should make this into a no-op, and detect whether we're
|
||||
#compiling for the iphone by using $target.
|
||||
AC_ARG_ENABLE(iphone,
|
||||
AS_HELP_STRING(--enable-iphone, compile with iPhone support),
|
||||
[if test x$enableval = xyes ; then
|
||||
tor_cv_iphone=true
|
||||
CFLAGS="$CFLAGS -D__DARWIN_UNIX03 -DIPHONE"
|
||||
fi])
|
||||
|
||||
#XXXX020 We should make these enabled or not, before 0.2.0.x-final
|
||||
AC_ARG_ENABLE(buf-freelists,
|
||||
AS_HELP_STRING(--disable-buf-freelists, disable freelists for buffer RAM))
|
||||
AC_ARG_ENABLE(openbsd-malloc,
|
||||
AS_HELP_STRING(--enable-openbsd-malloc, Use malloc code from openbsd. Linux only))
|
||||
AC_ARG_ENABLE(instrument-downloads,
|
||||
AS_HELP_STRING(--enable-instrument-downloads, Instrument downloads of directory resources etc.))
|
||||
AC_ARG_ENABLE(static-openssl,
|
||||
AS_HELP_STRING(--enable-static-openssl, Link against a static openssl library. Requires --with-openssl-dir))
|
||||
AC_ARG_ENABLE(static-libevent,
|
||||
AS_HELP_STRING(--enable-static-libevent, Link against a static libevent library. Requires --with-libevent-dir))
|
||||
|
||||
if test x$enable_buf_freelists != xno; then
|
||||
AC_DEFINE(ENABLE_BUF_FREELISTS, 1,
|
||||
[Defined if we try to use freelists for buffer RAM chunks])
|
||||
fi
|
||||
AM_CONDITIONAL(USE_OPENBSD_MALLOC, test x$enable_openbsd_malloc = xyes)
|
||||
if test x$enable_instrument_downloads = xyes; then
|
||||
AC_DEFINE(INSTRUMENT_DOWNLOADS, 1,
|
||||
[Defined if we want to keep track of how much of each kind of resource we download.])
|
||||
fi
|
||||
|
||||
AC_ARG_ENABLE(transparent,
|
||||
AS_HELP_STRING(--disable-transparent, disable transparent proxy support),
|
||||
[case "${enableval}" in
|
||||
yes) transparent=true ;;
|
||||
no) transparent=false ;;
|
||||
*) AC_MSG_ERROR(bad value for --enable-transparent) ;;
|
||||
esac], [transparent=true])
|
||||
|
||||
AC_ARG_ENABLE(threads,
|
||||
AS_HELP_STRING(--disable-threads, disable multi-threading support))
|
||||
|
||||
if test x$enable_threads = x; then
|
||||
case $host in
|
||||
*-*-solaris* )
|
||||
# Don't try multithreading on solaris -- cpuworkers seem to lock.
|
||||
AC_MSG_NOTICE([You are running Solaris; Sometimes threading makes
|
||||
cpu workers lock up here, so I will disable threads.])
|
||||
enable_threads="no";;
|
||||
*)
|
||||
enable_threads="yes";;
|
||||
esac
|
||||
fi
|
||||
|
||||
if test "$enable_threads" = "yes"; then
|
||||
AC_DEFINE(ENABLE_THREADS, 1, [Defined if we will try to use multithreading])
|
||||
fi
|
||||
|
||||
case $host in
|
||||
*-*-solaris* )
|
||||
AC_DEFINE(_REENTRANT, 1, [Define on some platforms to activate x_r() functions in time.h])
|
||||
;;
|
||||
esac
|
||||
|
||||
AC_ARG_ENABLE(geoip-stats,
|
||||
AS_HELP_STRING(--enable-geoip-stats, enable code for directories to collect per-country statistics))
|
||||
|
||||
if test "$enable_geoip_stats" = "yes"; then
|
||||
AC_DEFINE(ENABLE_GEOIP_STATS, 1, [Defined if we try to collect per-country statistics])
|
||||
fi
|
||||
|
||||
AC_ARG_ENABLE(gcc-warnings,
|
||||
AS_HELP_STRING(--enable-gcc-warnings, enable verbose warnings))
|
||||
AC_ARG_ENABLE(gcc-warnings-advisory,
|
||||
AS_HELP_STRING(--enable-gcc-warnings-advisory, [enable verbose warnings, excluding -Werror]))
|
||||
|
||||
AC_ARG_ENABLE(local-appdata,
|
||||
AS_HELP_STRING(--enable-local-appdata, default to host local application data paths on Windows))
|
||||
if test "$enable_local_appdata" = "yes"; then
|
||||
AC_DEFINE(ENABLE_LOCAL_APPDATA, 1,
|
||||
[Defined if we default to host local appdata paths on Windows])
|
||||
fi
|
||||
|
||||
AC_PROG_CC
|
||||
AC_PROG_CPP
|
||||
AC_PROG_MAKE_SET
|
||||
AC_PROG_RANLIB
|
||||
|
||||
TORUSER=_tor
|
||||
AC_ARG_WITH(tor-user,
|
||||
[ --with-tor-user=NAME Specify username for tor daemon ],
|
||||
[
|
||||
TORUSER=$withval
|
||||
]
|
||||
)
|
||||
AC_SUBST(TORUSER)
|
||||
|
||||
TORGROUP=_tor
|
||||
AC_ARG_WITH(tor-group,
|
||||
[ --with-tor-group=NAME Specify group name for tor daemon ],
|
||||
[
|
||||
TORGROUP=$withval
|
||||
]
|
||||
)
|
||||
AC_SUBST(TORGROUP)
|
||||
|
||||
|
||||
dnl If WIN32 is defined and non-zero, we are building for win32
|
||||
AC_MSG_CHECKING([for win32])
|
||||
AC_RUN_IFELSE([
|
||||
int main(int c, char **v) {
|
||||
#ifdef WIN32
|
||||
#if WIN32
|
||||
return 0;
|
||||
#else
|
||||
return 1;
|
||||
#endif
|
||||
#else
|
||||
return 2;
|
||||
#endif
|
||||
}],
|
||||
bwin32=true; AC_MSG_RESULT([yes]),
|
||||
bwin32=false; AC_MSG_RESULT([no]),
|
||||
bwin32=cross; AC_MSG_RESULT([cross])
|
||||
)
|
||||
|
||||
if test "$bwin32" = cross; then
|
||||
AC_MSG_CHECKING([for win32 (cross)])
|
||||
AC_COMPILE_IFELSE([
|
||||
#ifdef WIN32
|
||||
int main(int c, char **v) {return 0;}
|
||||
#else
|
||||
#error
|
||||
int main(int c, char **v) {return x(y);}
|
||||
#endif
|
||||
],
|
||||
bwin32=true; AC_MSG_RESULT([yes]),
|
||||
bwin32=false; AC_MSG_RESULT([no]))
|
||||
fi
|
||||
|
||||
if test "$bwin32" = true; then
|
||||
AC_DEFINE(MS_WINDOWS, 1, [Define to 1 if we are building for Windows.])
|
||||
fi
|
||||
AM_CONDITIONAL(BUILD_NT_SERVICES, test x$bwin32 = xtrue)
|
||||
|
||||
dnl Enable C99 when compiling with MIPSpro
|
||||
AC_MSG_CHECKING([for MIPSpro compiler])
|
||||
AC_COMPILE_IFELSE(AC_LANG_PROGRAM(, [
|
||||
#if (defined(__sgi) && defined(_COMPILER_VERSION))
|
||||
#error
|
||||
return x(y);
|
||||
#endif
|
||||
]),
|
||||
bmipspro=false; AC_MSG_RESULT(no),
|
||||
bmipspro=true; AC_MSG_RESULT(yes))
|
||||
|
||||
if test "$bmipspro" = true; then
|
||||
CFLAGS="$CFLAGS -c99"
|
||||
fi
|
||||
|
||||
AC_C_BIGENDIAN
|
||||
|
||||
AC_SEARCH_LIBS(socket, [socket])
|
||||
AC_SEARCH_LIBS(gethostbyname, [nsl])
|
||||
AC_SEARCH_LIBS(dlopen, [dl])
|
||||
AC_SEARCH_LIBS(inet_aton, [resolv])
|
||||
|
||||
if test "$enable_threads" = "yes"; then
|
||||
AC_SEARCH_LIBS(pthread_create, [pthread])
|
||||
AC_SEARCH_LIBS(pthread_detach, [pthread])
|
||||
fi
|
||||
|
||||
dnl -------------------------------------------------------------------
|
||||
dnl Check for functions before libevent, since libevent-1.2 apparently
|
||||
dnl exports strlcpy without defining it in a header.
|
||||
|
||||
AC_CHECK_FUNCS(gettimeofday ftime socketpair uname inet_aton strptime getrlimit strlcat strlcpy strtoull getaddrinfo localtime_r gmtime_r memmem strtok_r writev readv flock prctl)
|
||||
|
||||
using_custom_malloc=no
|
||||
if test x$enable_openbsd_malloc = xyes ; then
|
||||
AC_DEFINE(HAVE_MALLOC_GOOD_SIZE, 1, [Defined if we have the malloc_good_size function])
|
||||
using_custom_malloc=yes
|
||||
fi
|
||||
if test x$tcmalloc = xyes ; then
|
||||
using_custom_malloc=yes
|
||||
fi
|
||||
if test $using_custom_malloc = no ; then
|
||||
AC_CHECK_FUNCS(mallinfo malloc_good_size malloc_usable_size)
|
||||
fi
|
||||
|
||||
if test "$enable_threads" = "yes"; then
|
||||
AC_CHECK_HEADERS(pthread.h)
|
||||
AC_CHECK_FUNCS(pthread_create)
|
||||
fi
|
||||
|
||||
dnl ------------------------------------------------------
|
||||
dnl Where do you live, libevent? And how do we call you?
|
||||
|
||||
if test "$bwin32" = true; then
|
||||
TOR_LIB_WS32=-lws2_32
|
||||
# Some of the cargo-cults recommend -lwsock32 as well, but I don't
|
||||
# think it's actually necessary.
|
||||
TOR_LIB_GDI=-lgdi32
|
||||
else
|
||||
TOR_LIB_WS32=
|
||||
TOR_LIB_GDI=
|
||||
fi
|
||||
AC_SUBST(TOR_LIB_WS32)
|
||||
AC_SUBST(TOR_LIB_GDI)
|
||||
|
||||
dnl We need to do this before we try our disgusting hack below.
|
||||
AC_CHECK_HEADERS([sys/types.h])
|
||||
|
||||
dnl This is a disgusting hack so we safely include older libevent headers.
|
||||
AC_CHECK_TYPE(u_int64_t, unsigned long long)
|
||||
AC_CHECK_TYPE(u_int32_t, unsigned long)
|
||||
AC_CHECK_TYPE(u_int16_t, unsigned short)
|
||||
AC_CHECK_TYPE(u_int8_t, unsigned char)
|
||||
|
||||
tor_libevent_pkg_redhat="libevent"
|
||||
tor_libevent_pkg_debian="libevent-dev"
|
||||
tor_libevent_devpkg_redhat="libevent-devel"
|
||||
tor_libevent_devpkg_debian="libevent-dev"
|
||||
|
||||
TOR_SEARCH_LIBRARY(libevent, $trylibeventdir, [-levent $TOR_LIB_WS32], [
|
||||
#ifdef WIN32
|
||||
#include <winsock2.h>
|
||||
#endif
|
||||
#include <stdlib.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/types.h>
|
||||
#include <event.h>], [
|
||||
#ifdef WIN32
|
||||
#include <winsock2.h>
|
||||
#endif
|
||||
void exit(int); void *event_init(void);],
|
||||
[
|
||||
#ifdef WIN32
|
||||
{WSADATA d; WSAStartup(0x101,&d); }
|
||||
#endif
|
||||
event_init(); exit(0);
|
||||
], [--with-libevent-dir], [/opt/libevent])
|
||||
|
||||
dnl Now check for particular libevent functions.
|
||||
save_LIBS="$LIBS"
|
||||
save_LDFLAGS="$LDFLAGS"
|
||||
save_CPPFLAGS="$CPPFLAGS"
|
||||
LIBS="-levent $TOR_LIB_WS32 $LIBS"
|
||||
LDFLAGS="$TOR_LDFLAGS_libevent $LDFLAGS"
|
||||
CPPFLAGS="$TOR_CPPFLAGS_libevent $CPPFLAGS"
|
||||
AC_CHECK_FUNCS(event_get_version event_get_method event_set_log_callback)
|
||||
AC_CHECK_MEMBERS([struct event.min_heap_idx], , ,
|
||||
[#include <event.h>
|
||||
])
|
||||
|
||||
LIBS="$save_LIBS"
|
||||
LDFLAGS="$save_LDFLAGS"
|
||||
CPPFLAGS="$save_CPPFLAGS"
|
||||
|
||||
if test "$enable_static_libevent" = "yes"; then
|
||||
if test "$tor_cv_library_libevent_dir" = "(system)"; then
|
||||
AC_MSG_ERROR("You must specify an explicit --with-libevent-dir=x option when using --enable-static-libevent")
|
||||
else
|
||||
TOR_LIBEVENT_LIBS="$TOR_LIBDIR_libevent/libevent.a"
|
||||
fi
|
||||
else
|
||||
TOR_LIBEVENT_LIBS="-levent"
|
||||
fi
|
||||
AC_SUBST(TOR_LIBEVENT_LIBS)
|
||||
|
||||
dnl ------------------------------------------------------
|
||||
dnl Where do you live, openssl? And how do we call you?
|
||||
|
||||
tor_openssl_pkg_redhat="openssl"
|
||||
tor_openssl_pkg_debian="libssl"
|
||||
tor_openssl_devpkg_redhat="openssl-devel"
|
||||
tor_openssl_devpkg_debian="libssl-dev"
|
||||
|
||||
ALT_openssl_WITHVAL=""
|
||||
AC_ARG_WITH(ssl-dir,
|
||||
[ --with-ssl-dir=PATH Obsolete alias for --with-openssl-dir ],
|
||||
[
|
||||
if test "x$withval" != xno && test "x$withval" != "x" ; then
|
||||
ALT_openssl_WITHVAL="$withval"
|
||||
fi
|
||||
])
|
||||
|
||||
TOR_SEARCH_LIBRARY(openssl, $tryssldir, [-lssl -lcrypto $TOR_LIB_GDI],
|
||||
[#include <openssl/rand.h>],
|
||||
[void RAND_add(const void *buf, int num, double entropy);],
|
||||
[RAND_add((void*)0,0,0); exit(0);], [],
|
||||
[/usr/local/openssl /usr/lib/openssl /usr/local/ssl /usr/lib/ssl /usr/local /usr/athena /opt/openssl])
|
||||
|
||||
dnl XXXX check for OPENSSL_VERSION_NUMBER == SSLeay()
|
||||
|
||||
echo "tor_cv_library_openssl_dir is $tor_cv_library_openssl_dir"
|
||||
if test "$enable_static_openssl" = "yes"; then
|
||||
if test "$tor_cv_library_openssl_dir" = "(system)"; then
|
||||
AC_MSG_ERROR("You must specify an explicit --with-openssl-dir=x option when using --enable-static-openssl")
|
||||
else
|
||||
TOR_OPENSSL_LIBS="$TOR_LIBDIR_openssl/libssl.a $TOR_LIBDIR_openssl/libcrypto.a"
|
||||
fi
|
||||
else
|
||||
TOR_OPENSSL_LIBS="-lssl -lcrypto"
|
||||
fi
|
||||
AC_SUBST(TOR_OPENSSL_LIBS)
|
||||
|
||||
dnl ------------------------------------------------------
|
||||
dnl Where do you live, zlib? And how do we call you?
|
||||
|
||||
tor_zlib_pkg_redhat="zlib"
|
||||
tor_zlib_pkg_debian="zlib1g"
|
||||
tor_zlib_devpkg_redhat="zlib-devel"
|
||||
tor_zlib_devpkg_debian="zlib1g-dev"
|
||||
|
||||
TOR_SEARCH_LIBRARY(zlib, $tryzlibdir, [-lz],
|
||||
[#include <zlib.h>],
|
||||
[const char * zlibVersion(void);],
|
||||
[zlibVersion(); exit(0);], [--with-zlib-dir],
|
||||
[/opt/zlib])
|
||||
|
||||
dnl Make sure to enable support for large off_t if available.
|
||||
|
||||
AC_SYS_LARGEFILE
|
||||
|
||||
AC_CHECK_HEADERS(unistd.h string.h signal.h sys/stat.h sys/types.h fcntl.h sys/fcntl.h sys/time.h errno.h assert.h time.h, , AC_MSG_WARN(Some headers were not found, compilation may fail. If compilation succeeds, please send your orconfig.h to the developers so we can fix this warning.))
|
||||
|
||||
AC_CHECK_HEADERS(netdb.h sys/ioctl.h sys/socket.h arpa/inet.h netinet/in.h pwd.h grp.h sys/un.h sys/uio.h)
|
||||
|
||||
dnl These headers are not essential
|
||||
|
||||
AC_CHECK_HEADERS(stdint.h sys/types.h inttypes.h sys/param.h sys/wait.h limits.h sys/limits.h netinet/in.h arpa/inet.h machine/limits.h syslog.h sys/time.h sys/resource.h inttypes.h utime.h sys/utime.h sys/mman.h netinet/in6.h malloc.h sys/syslimits.h malloc/malloc.h linux/types.h sys/file.h malloc_np.h sys/prctl.h)
|
||||
|
||||
TOR_CHECK_PROTOTYPE(malloc_good_size, HAVE_MALLOC_GOOD_SIZE_PROTOTYPE,
|
||||
[#ifdef HAVE_MALLOC_H
|
||||
#include <malloc.h>
|
||||
#endif
|
||||
#ifdef HAVE_MALLOC_MALLOC_H
|
||||
#include <malloc/malloc.h>
|
||||
#endif])
|
||||
|
||||
AC_CHECK_HEADERS(net/if.h, net_if_found=1, net_if_found=0,
|
||||
[#ifdef HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_SOCKET_H
|
||||
#include <sys/socket.h>
|
||||
#endif])
|
||||
AC_CHECK_HEADERS(net/pfvar.h, net_pfvar_found=1, net_pfvar_found=0,
|
||||
[#ifdef HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_SOCKET_H
|
||||
#include <sys/socket.h>
|
||||
#endif
|
||||
#ifdef HAVE_NET_IF_H
|
||||
#include <net/if.h>
|
||||
#endif])
|
||||
AC_CHECK_HEADERS(linux/netfilter_ipv4.h,
|
||||
linux_netfilter_ipv4=1, linux_netfilter_ipv4=0,
|
||||
[#ifdef HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_SOCKET_H
|
||||
#include <sys/socket.h>
|
||||
#endif
|
||||
#ifdef HAVE_LIMITS_H
|
||||
#include <limits.h>
|
||||
#endif
|
||||
#ifdef HAVE_LINUX_TYPES_H
|
||||
#include <linux/types.h>
|
||||
#endif
|
||||
#ifdef HAVE_NETINET_IN6_H
|
||||
#include <netinet/in6.h>
|
||||
#endif
|
||||
#ifdef HAVE_NETINET_IN_H
|
||||
#include <netinet/in.h>
|
||||
#endif])
|
||||
|
||||
if test x$transparent = xtrue ; then
|
||||
transparent_ok=0
|
||||
if test x$net_if_found = x1 && test x$net_pfvar_found = x1 ; then
|
||||
transparent_ok=1
|
||||
fi
|
||||
if test x$linux_netfilter_ipv4 = x1 ; then
|
||||
transparent_ok=1
|
||||
fi
|
||||
if test x$transparent_ok = x1 ; then
|
||||
AC_DEFINE(USE_TRANSPARENT, 1, "Define to enable transparent proxy support")
|
||||
case $host in
|
||||
*-*-openbsd*)
|
||||
AC_DEFINE(OPENBSD, 1, "Define to handle pf on OpenBSD properly") ;;
|
||||
esac
|
||||
else
|
||||
AC_MSG_NOTICE([Transparent proxy support enabled, but missing headers.])
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_CHECK_MEMBERS([struct timeval.tv_sec], , ,
|
||||
[#ifdef HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_TIME_H
|
||||
#include <sys/time.h>
|
||||
#endif])
|
||||
|
||||
dnl In case we aren't given a working stdint.h, we'll need to grow our own.
|
||||
dnl Watch out.
|
||||
|
||||
AC_CHECK_SIZEOF(int8_t)
|
||||
AC_CHECK_SIZEOF(int16_t)
|
||||
AC_CHECK_SIZEOF(int32_t)
|
||||
AC_CHECK_SIZEOF(int64_t)
|
||||
AC_CHECK_SIZEOF(uint8_t)
|
||||
AC_CHECK_SIZEOF(uint16_t)
|
||||
AC_CHECK_SIZEOF(uint32_t)
|
||||
AC_CHECK_SIZEOF(uint64_t)
|
||||
AC_CHECK_SIZEOF(intptr_t)
|
||||
AC_CHECK_SIZEOF(uintptr_t)
|
||||
|
||||
dnl AC_CHECK_TYPES([int8_t, int16_t, int32_t, int64_t, uint8_t, uint16_t, uint32_t, uint64_t, intptr_t, uintptr_t])
|
||||
|
||||
AC_CHECK_SIZEOF(char)
|
||||
AC_CHECK_SIZEOF(short)
|
||||
AC_CHECK_SIZEOF(int)
|
||||
AC_CHECK_SIZEOF(long)
|
||||
AC_CHECK_SIZEOF(long long)
|
||||
AC_CHECK_SIZEOF(__int64)
|
||||
AC_CHECK_SIZEOF(void *)
|
||||
AC_CHECK_SIZEOF(time_t)
|
||||
AC_CHECK_SIZEOF(size_t)
|
||||
|
||||
AC_CHECK_TYPES([uint, u_char, ssize_t])
|
||||
|
||||
dnl used to include sockaddr_storage, but everybody has that.
|
||||
AC_CHECK_TYPES([struct in6_addr, struct sockaddr_in6, sa_family_t], , ,
|
||||
[#ifdef HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#ifdef HAVE_NETINET_IN_H
|
||||
#include <netinet/in.h>
|
||||
#endif
|
||||
#ifdef HAVE_NETINET_IN6_H
|
||||
#include <netinet/in6.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_SOCKET_H
|
||||
#include <sys/socket.h>
|
||||
#endif
|
||||
#ifdef MS_WINDOWS
|
||||
#define WIN32_WINNT 0x400
|
||||
#define _WIN32_WINNT 0x400
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#if defined(_MSC_VER) && (_MSC_VER < 1300)
|
||||
#include <winsock.h>
|
||||
#else
|
||||
#include <winsock2.h>
|
||||
#include <ws2tcpip.h>
|
||||
#endif
|
||||
#endif
|
||||
])
|
||||
AC_CHECK_MEMBERS([struct in6_addr.s6_addr32, struct in6_addr.s6_addr16, struct sockaddr_in.sin_len, struct sockaddr_in6.sin6_len], , ,
|
||||
[#ifdef HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#ifdef HAVE_NETINET_IN_H
|
||||
#include <netinet/in.h>
|
||||
#endif
|
||||
#ifdef HAVE_NETINET_IN6_H
|
||||
#include <netinet/in6.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_SOCKET_H
|
||||
#include <sys/socket.h>
|
||||
#endif
|
||||
#ifdef MS_WINDOWS
|
||||
#define WIN32_WINNT 0x400
|
||||
#define _WIN32_WINNT 0x400
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#if defined(_MSC_VER) && (_MSC_VER < 1300)
|
||||
#include <winsock.h>
|
||||
#else
|
||||
#include <winsock2.h>
|
||||
#include <ws2tcpip.h>
|
||||
#endif
|
||||
#endif
|
||||
])
|
||||
|
||||
AC_CHECK_TYPES([rlim_t], , ,
|
||||
[#ifdef HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_TIME_H
|
||||
#include <sys/time.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_RESOURCE_H
|
||||
#include <sys/resource.h>
|
||||
#endif
|
||||
])
|
||||
|
||||
AC_CACHE_CHECK([whether time_t is signed], tor_cv_time_t_signed, [
|
||||
AC_RUN_IFELSE(AC_LANG_SOURCE([
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_TIME_H
|
||||
#include <sys/time.h>
|
||||
#endif
|
||||
#ifdef HAVE_TIME_H
|
||||
#include <time.h>
|
||||
#endif
|
||||
int main(int c, char**v) { if (((time_t)-1)<0) return 1; else return 0; }]),
|
||||
tor_cv_time_t_signed=no, tor_cv_time_t_signed=yes, tor_cv_time_t_signed=cross)
|
||||
])
|
||||
|
||||
if test "$tor_cv_time_t_signed" = cross; then
|
||||
AC_MSG_NOTICE([Cross compiling: assuming that time_t is signed.])
|
||||
fi
|
||||
|
||||
if test "$tor_cv_time_t_signed" != no; then
|
||||
AC_DEFINE([TIME_T_IS_SIGNED], 1,
|
||||
[Define to 1 iff time_t is signed])
|
||||
fi
|
||||
|
||||
AC_CHECK_SIZEOF(socklen_t, , [AC_INCLUDES_DEFAULT()
|
||||
#ifdef HAVE_SYS_SOCKET_H
|
||||
#include <sys/socket.h>
|
||||
#endif
|
||||
])
|
||||
|
||||
# We want to make sure that we _don't_ have a cell_t defined, like IRIX does.
|
||||
|
||||
AC_CHECK_SIZEOF(cell_t)
|
||||
|
||||
# Now make sure that NULL can be represented as zero bytes.
|
||||
AC_CACHE_CHECK([whether memset(0) sets pointers to NULL], tor_cv_null_is_zero,
|
||||
[AC_RUN_IFELSE([AC_LANG_SOURCE(
|
||||
[[#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#ifdef HAVE_STDDEF_H
|
||||
#include <stddef.h>
|
||||
#endif
|
||||
int main () { char *p1,*p2; p1=NULL; memset(&p2,0,sizeof(p2));
|
||||
return memcmp(&p1,&p2,sizeof(char*))?1:0; }]])],
|
||||
[tor_cv_null_is_zero=yes],
|
||||
[tor_cv_null_is_zero=no],
|
||||
[tor_cv_null_is_zero=cross])])
|
||||
|
||||
if test "$tor_cv_null_is_zero" = cross ; then
|
||||
# Cross-compiling; let's hope that the target isn't raving mad.
|
||||
AC_MSG_NOTICE([Cross-compiling: we'll assume that NULL is represented as a sequence of 0-valued bytes.])
|
||||
fi
|
||||
|
||||
if test "$tor_cv_null_is_zero" != no; then
|
||||
AC_DEFINE([NULL_REP_IS_ZERO_BYTES], 1,
|
||||
[Define to 1 iff memset(0) sets pointers to NULL])
|
||||
fi
|
||||
|
||||
# And what happens when we malloc zero?
|
||||
AC_CACHE_CHECK([whether we can malloc(0) safely.], tor_cv_malloc_zero_works,
|
||||
[AC_RUN_IFELSE([AC_LANG_SOURCE(
|
||||
[[#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#ifdef HAVE_STDDEF_H
|
||||
#include <stddef.h>
|
||||
#endif
|
||||
int main () { return malloc(0)?0:1; }]])],
|
||||
[tor_cv_malloc_zero_works=yes],
|
||||
[tor_cv_malloc_zero_works=no],
|
||||
[tor_cv_malloc_zero_works=cross])])
|
||||
|
||||
if test "$tor_cv_malloc_zero_works" = cross; then
|
||||
# Cross-compiling; let's hope that the target isn't raving mad.
|
||||
AC_MSG_NOTICE([Cross-compiling: we'll assume that we need to check malloc() arguments for 0.])
|
||||
fi
|
||||
|
||||
if test "$tor_cv_malloc_zero_works" = yes; then
|
||||
AC_DEFINE([MALLOC_ZERO_WORKS], 1,
|
||||
[Define to 1 iff malloc(0) returns a pointer])
|
||||
fi
|
||||
|
||||
# whether we seem to be in a 2s-complement world.
|
||||
AC_CACHE_CHECK([whether we are using 2s-complement arithmetic], tor_cv_twos_complement,
|
||||
[AC_RUN_IFELSE([AC_LANG_SOURCE(
|
||||
[[int main () { int problem = ((-99) != (~99)+1);
|
||||
return problem ? 1 : 0; }]])],
|
||||
[tor_cv_twos_complement=yes],
|
||||
[tor_cv_twos_complement=no],
|
||||
[tor_cv_twos_complement=cross])])
|
||||
|
||||
if test "$tor_cv_twos_complement" = cross ; then
|
||||
# Cross-compiling; let's hope that the target isn't raving mad.
|
||||
AC_MSG_NOTICE([Cross-compiling: we'll assume that negative integers are represented with two's complement.])
|
||||
fi
|
||||
|
||||
if test "$tor_cv_twos_complement" != no ; then
|
||||
AC_DEFINE([USING_TWOS_COMPLEMENT], 1,
|
||||
[Define to 1 iff we represent negative integers with two's complement])
|
||||
fi
|
||||
|
||||
# What does shifting a negative value do?
|
||||
AC_CACHE_CHECK([whether right-shift on negative values does sign-extension], tor_cv_sign_extend,
|
||||
[AC_RUN_IFELSE([AC_LANG_SOURCE(
|
||||
[[int main () { int okay = (-60 >> 8) == -1; return okay ? 0 : 1; }]])],
|
||||
[tor_cv_sign_extend=yes],
|
||||
[tor_cv_sign_extend=no],
|
||||
[tor_cv_sign_extend=cross])])
|
||||
|
||||
if test "$tor_cv_sign_extend" = cross ; then
|
||||
# Cross-compiling; let's hope that the target isn't raving mad.
|
||||
AC_MSG_NOTICE([Cross-compiling: we'll assume that right-shifting negative integers causes sign-extension])
|
||||
fi
|
||||
|
||||
if test "$tor_cv_sign_extend" != no ; then
|
||||
AC_DEFINE([RSHIFT_DOES_SIGN_EXTEND], 1,
|
||||
[Define to 1 iff right-shifting a negative value performs sign-extension])
|
||||
fi
|
||||
|
||||
# Whether we should use the dmalloc memory allocation debugging library.
|
||||
AC_MSG_CHECKING(whether to use dmalloc (debug memory allocation library))
|
||||
AC_ARG_WITH(dmalloc,
|
||||
[ --with-dmalloc Use debug memory allocation library. ],
|
||||
[if [[ "$withval" = "yes" ]]; then
|
||||
dmalloc=1
|
||||
AC_MSG_RESULT(yes)
|
||||
else
|
||||
dmalloc=1
|
||||
AC_MSG_RESULT(no)
|
||||
fi], [ dmalloc=0; AC_MSG_RESULT(no) ]
|
||||
)
|
||||
|
||||
if [[ $dmalloc -eq 1 ]]; then
|
||||
AC_CHECK_HEADERS(dmalloc.h, , AC_MSG_ERROR(dmalloc header file not found. Do you have the development files for dmalloc installed?))
|
||||
AC_SEARCH_LIBS(dmalloc_malloc, [dmallocth dmalloc], , AC_MSG_ERROR(Libdmalloc library not found. If you enable it you better have it installed.))
|
||||
AC_DEFINE(USE_DMALLOC, 1, [Debug memory allocation library])
|
||||
AC_DEFINE(DMALLOC_FUNC_CHECK, 1, [Enable dmalloc's malloc function check])
|
||||
AC_CHECK_FUNCS(dmalloc_strdup dmalloc_strndup)
|
||||
fi
|
||||
|
||||
AC_ARG_WITH(tcmalloc,
|
||||
[ --with-tcmalloc Use tcmalloc memory allocation library. ],
|
||||
[ tcmalloc=yes ], [ tcmalloc=no ])
|
||||
|
||||
if test x$tcmalloc = xyes ; then
|
||||
LDFLAGS="-ltcmalloc $LDFLAGS"
|
||||
fi
|
||||
|
||||
# Allow user to specify an alternate syslog facility
|
||||
AC_ARG_WITH(syslog-facility,
|
||||
[ --with-syslog-facility=LOG syslog facility to use (default=LOG_DAEMON)],
|
||||
syslog_facility="$withval", syslog_facility="LOG_DAEMON")
|
||||
AC_DEFINE_UNQUOTED(LOGFACILITY,$syslog_facility,[name of the syslog facility])
|
||||
AC_SUBST(LOGFACILITY)
|
||||
|
||||
# Check if we have getresuid and getresgid
|
||||
AC_CHECK_FUNCS(getresuid getresgid)
|
||||
|
||||
# Check for gethostbyname_r in all its glorious incompatible versions.
|
||||
# (This logic is based on that in Python's configure.in)
|
||||
AH_TEMPLATE(HAVE_GETHOSTBYNAME_R,
|
||||
[Define this if you have any gethostbyname_r()])
|
||||
|
||||
AC_CHECK_FUNC(gethostbyname_r, [
|
||||
AC_MSG_CHECKING([how many arguments gethostbyname_r() wants])
|
||||
OLD_CFLAGS=$CFLAGS
|
||||
CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
|
||||
AC_COMPILE_IFELSE(AC_LANG_PROGRAM([
|
||||
#include <netdb.h>
|
||||
], [[
|
||||
char *cp1, *cp2;
|
||||
struct hostent *h1, *h2;
|
||||
int i1, i2;
|
||||
(void)gethostbyname_r(cp1,h1,cp2,i1,&h2,&i2);
|
||||
]]),[
|
||||
AC_DEFINE(HAVE_GETHOSTBYNAME_R)
|
||||
AC_DEFINE(HAVE_GETHOSTBYNAME_R_6_ARG, 1,
|
||||
[Define this if gethostbyname_r takes 6 arguments])
|
||||
AC_MSG_RESULT(6)
|
||||
], [
|
||||
AC_TRY_COMPILE([
|
||||
#include <netdb.h>
|
||||
], [
|
||||
char *cp1, *cp2;
|
||||
struct hostent *h1;
|
||||
int i1, i2;
|
||||
(void)gethostbyname_r(cp1,h1,cp2,i1,&i2);
|
||||
], [
|
||||
AC_DEFINE(HAVE_GETHOSTBYNAME_R)
|
||||
AC_DEFINE(HAVE_GETHOSTBYNAME_R_5_ARG, 1,
|
||||
[Define this if gethostbyname_r takes 5 arguments])
|
||||
AC_MSG_RESULT(5)
|
||||
], [
|
||||
AC_TRY_COMPILE([
|
||||
#include <netdb.h>
|
||||
], [
|
||||
char *cp1;
|
||||
struct hostent *h1;
|
||||
struct hostent_data hd;
|
||||
(void) gethostbyname_r(cp1,h1,&hd);
|
||||
], [
|
||||
AC_DEFINE(HAVE_GETHOSTBYNAME_R)
|
||||
AC_DEFINE(HAVE_GETHOSTBYNAME_R_3_ARG, 1,
|
||||
[Define this if gethostbyname_r takes 3 arguments])
|
||||
AC_MSG_RESULT(3)
|
||||
], [
|
||||
AC_MSG_RESULT(0)
|
||||
])
|
||||
])
|
||||
])
|
||||
CFLAGS=$OLD_CFLAGS
|
||||
])
|
||||
|
||||
AC_CACHE_CHECK([whether the C compiler supports __func__],
|
||||
tor_cv_have_func_macro,
|
||||
AC_COMPILE_IFELSE([
|
||||
#include <stdio.h>
|
||||
int main(int c, char **v) { puts(__func__); }],
|
||||
tor_cv_have_func_macro=yes,
|
||||
tor_cv_have_func_macro=no))
|
||||
|
||||
AC_CACHE_CHECK([whether the C compiler supports __FUNC__],
|
||||
tor_cv_have_FUNC_macro,
|
||||
AC_COMPILE_IFELSE([
|
||||
#include <stdio.h>
|
||||
int main(int c, char **v) { puts(__FUNC__); }],
|
||||
tor_cv_have_FUNC_macro=yes,
|
||||
tor_cv_have_FUNC_macro=no))
|
||||
|
||||
AC_CACHE_CHECK([whether the C compiler supports __FUNCTION__],
|
||||
tor_cv_have_FUNCTION_macro,
|
||||
AC_COMPILE_IFELSE([
|
||||
#include <stdio.h>
|
||||
int main(int c, char **v) { puts(__FUNCTION__); }],
|
||||
tor_cv_have_FUNCTION_macro=yes,
|
||||
tor_cv_have_FUNCTION_macro=no))
|
||||
|
||||
if test "$tor_cv_have_func_macro" = 'yes'; then
|
||||
AC_DEFINE(HAVE_MACRO__func__, 1, [Defined if the compiler supports __func__])
|
||||
fi
|
||||
|
||||
if test "$tor_cv_have_FUNC_macro" = 'yes'; then
|
||||
AC_DEFINE(HAVE_MACRO__FUNC__, 1, [Defined if the compiler supports __FUNC__])
|
||||
fi
|
||||
|
||||
if test "$tor_cv_have_FUNCTION_macro" = 'yes'; then
|
||||
AC_DEFINE(HAVE_MACRO__FUNCTION__, 1,
|
||||
[Defined if the compiler supports __FUNCTION__])
|
||||
fi
|
||||
|
||||
# $prefix stores the value of the --prefix command line option, or
|
||||
# NONE if the option wasn't set. In the case that it wasn't set, make
|
||||
# it be the default, so that we can use it to expand directories now.
|
||||
if test "x$prefix" = "xNONE"; then
|
||||
prefix=$ac_default_prefix
|
||||
fi
|
||||
|
||||
# and similarly for $exec_prefix
|
||||
if test "x$exec_prefix" = "xNONE"; then
|
||||
exec_prefix=$prefix
|
||||
fi
|
||||
|
||||
if test "x$CONFDIR" = "x"; then
|
||||
CONFDIR=`eval echo $sysconfdir/tor`
|
||||
fi
|
||||
AC_SUBST(CONFDIR)
|
||||
AH_TEMPLATE([CONFDIR],[tor's configuration directory])
|
||||
AC_DEFINE_UNQUOTED(CONFDIR,"$CONFDIR")
|
||||
|
||||
BINDIR=`eval echo $bindir`
|
||||
AC_SUBST(BINDIR)
|
||||
LOCALSTATEDIR=`eval echo $localstatedir`
|
||||
AC_SUBST(LOCALSTATEDIR)
|
||||
|
||||
# Set CFLAGS _after_ all the above checks, since our warnings are stricter
|
||||
# than autoconf's macros like.
|
||||
if test "$GCC" = yes; then
|
||||
CFLAGS="$CFLAGS -Wall -g -O2"
|
||||
# Disable GCC's strict aliasing checks. They are an hours-to-debug
|
||||
# accident waiting to happen.
|
||||
CFLAGS="$CFLAGS -fno-strict-aliasing"
|
||||
else
|
||||
CFLAGS="$CFLAGS -g -O"
|
||||
enable_gcc_warnings=no
|
||||
enable_gcc_warnings_advisory=no
|
||||
fi
|
||||
|
||||
# Add some more warnings which we use in development but not in the
|
||||
# released versions. (Some relevant gcc versions can't handle these.)
|
||||
if test x$enable_gcc_warnings = xyes || test x$enable_gcc_warnings_advisory = xyes; then
|
||||
|
||||
AC_COMPILE_IFELSE(AC_LANG_PROGRAM([], [
|
||||
#if !defined(__GNUC__) || (__GNUC__ < 4)
|
||||
#error
|
||||
#endif]), have_gcc4=yes, have_gcc4=no)
|
||||
|
||||
AC_COMPILE_IFELSE(AC_LANG_PROGRAM([], [
|
||||
#if !defined(__GNUC__) || (__GNUC__ < 4) || (__GNUC__ == 4 && __GNUC_MINOR__ < 2)
|
||||
#error
|
||||
#endif]), have_gcc42=yes, have_gcc42=no)
|
||||
|
||||
AC_COMPILE_IFELSE(AC_LANG_PROGRAM([], [
|
||||
#if !defined(__GNUC__) || (__GNUC__ < 4) || (__GNUC__ == 4 && __GNUC_MINOR__ < 3)
|
||||
#error
|
||||
#endif]), have_gcc43=yes, have_gcc43=no)
|
||||
|
||||
save_CFLAGS="$CFLAGS"
|
||||
CFLAGS="$CFLAGS -Wshorten-64-to-32"
|
||||
AC_COMPILE_IFELSE(AC_LANG_PROGRAM([], []), have_shorten64_flag=yes,
|
||||
have_shorten64_flag=no)
|
||||
CFLAGS="$save_CFLAGS"
|
||||
|
||||
case $host in
|
||||
*-*-openbsd*)
|
||||
# Some OpenBSD versions (like 4.8) have -Wsystem-headers by default.
|
||||
# That's fine, except that the headers don't pass -Wredundant-decls.
|
||||
# Therefore, let's disable -Wsystem-headers when we're building
|
||||
# with maximal warnings on OpenBSD.
|
||||
CFLAGS="$CFLAGS -Wno-system-headers" ;;
|
||||
esac
|
||||
|
||||
CFLAGS="$CFLAGS -W -Wfloat-equal -Wundef -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wwrite-strings -Wredundant-decls -Wchar-subscripts -Wcomment -Wformat=2 -Wwrite-strings -Wmissing-declarations -Wredundant-decls -Wnested-externs -Wbad-function-cast -Wswitch-enum"
|
||||
if test x$enable_gcc_warnings = xyes; then
|
||||
CFLAGS="$CFLAGS -Werror"
|
||||
fi
|
||||
|
||||
# Disabled, so we can use mallinfo(): -Waggregate-return
|
||||
|
||||
if test x$have_gcc4 = xyes ; then
|
||||
# These warnings break gcc 3.3.5 and work on gcc 4.0.2
|
||||
CFLAGS="$CFLAGS -Winit-self -Wmissing-field-initializers -Wdeclaration-after-statement -Wold-style-definition"
|
||||
fi
|
||||
|
||||
if test x$have_gcc42 = xyes ; then
|
||||
# These warnings break gcc 4.0.2 and work on gcc 4.2
|
||||
# XXXX020 Use -fstack-protector.
|
||||
# XXXX020 See if any of these work with earlier versions.
|
||||
CFLAGS="$CFLAGS -Waddress -Wmissing-noreturn -Wnormalized=id -Woverride-init -Wstrict-overflow=1"
|
||||
# We used to use -Wstrict-overflow=5, but that breaks us heavily under 4.3.
|
||||
fi
|
||||
|
||||
if test x$have_gcc43 = xyes ; then
|
||||
# These warnings break gcc 4.2 and work on gcc 4.3
|
||||
# XXXX020 See if any of these work with earlier versions.
|
||||
CFLAGS="$CFLAGS -Wextra -Warray-bounds"
|
||||
fi
|
||||
|
||||
if test x$have_shorten64_flag = xyes ; then
|
||||
CFLAGS="$CFLAGS -Wshorten-64-to-32"
|
||||
fi
|
||||
|
||||
##This will break the world on some 64-bit architectures
|
||||
# CFLAGS="$CFLAGS -Winline"
|
||||
fi
|
||||
|
||||
|
||||
|
||||
CPPFLAGS="$CPPFLAGS $TOR_CPPFLAGS_libevent $TOR_CPPFLAGS_openssl $TOR_CPPFLAGS_zlib"
|
||||
|
||||
AC_CONFIG_FILES([Makefile tor.spec Doxyfile contrib/tor.sh contrib/torctl contrib/torify contrib/tor.logrotate contrib/Makefile contrib/osx/Makefile contrib/osx/TorBundleDesc.plist contrib/osx/TorBundleInfo.plist contrib/osx/TorDesc.plist contrib/osx/TorInfo.plist contrib/osx/TorStartupDesc.plist src/config/torrc.sample doc/tor.1 src/Makefile doc/Makefile doc/design-paper/Makefile src/config/Makefile src/common/Makefile src/or/Makefile src/win32/Makefile src/tools/Makefile contrib/suse/Makefile contrib/suse/tor.sh])
|
||||
AC_OUTPUT
|
||||
|
||||
if test -x /usr/bin/perl && test -x ./contrib/updateVersions.pl ; then
|
||||
./contrib/updateVersions.pl
|
||||
fi
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
SUBDIRS = osx suse
|
||||
DIST_SUBDIRS = osx suse
|
||||
|
||||
confdir = $(sysconfdir)/tor
|
||||
|
||||
EXTRA_DIST = exitlist tor-tsocks.conf torify.1 tor.nsi.in tor.sh torctl rc.subr cross.sh tor-mingw.nsi.in package_nsis-mingw.sh tor.ico tor-ctrl.sh linux-tor-prio.sh tor-exit-notice.html
|
||||
|
||||
conf_DATA = tor-tsocks.conf
|
||||
|
||||
bin_SCRIPTS = torify
|
||||
|
||||
man_MANS = torify.1
|
|
@ -1,68 +0,0 @@
|
|||
The contrib/ directory contains small tools that might be useful for using
|
||||
with Tor. A few of them are included in the Tor source distribution; you can
|
||||
find the others in the main Tor repository. We don't guarantee that they're
|
||||
particularly useful.
|
||||
|
||||
dirauth-tools/ -- Tools useful for directory authority administrators
|
||||
---------------------------------------------------------------------
|
||||
|
||||
add-tor is an old script to manipulate the approved-routers file.
|
||||
|
||||
nagios-check-tor-authority-cert is a nagios script to check when Tor
|
||||
authority certificates are expired or nearly expired.
|
||||
|
||||
clang/ -- Files for use with the clang compiler
|
||||
-----------------------------------------------
|
||||
|
||||
sanitize_blacklist.txt is used to build Tor with clang's dynamic
|
||||
AddressSanitizer and UndefinedBehaviorSanitizer. It contains detailed
|
||||
instructions on configuration, build, and testing with clang's sanitizers.
|
||||
|
||||
client-tools/ -- Tools for use with Tor clients
|
||||
-----------------------------------------------
|
||||
|
||||
torify is a small wrapper script around torsocks.
|
||||
|
||||
tor-resolve.py uses Tor's SOCKS port extensions to perform DNS lookups. You
|
||||
should probably use src/tools/tor-resolve instead.
|
||||
|
||||
dist/ -- Scripts and files for use when packaging Tor
|
||||
-----------------------------------------------------
|
||||
|
||||
torctl, rc.subr, and tor.sh are init scripts for use with SysV-style init
|
||||
tools. Everybody likes to write init scripts differently, it seems.
|
||||
|
||||
tor.service is a sample service file for use with systemd.
|
||||
|
||||
The suse/ subdirectory contains files used by the suse distribution.
|
||||
|
||||
operator-tools/ -- Tools for Tor relay operators
|
||||
------------------------------------------------
|
||||
|
||||
tor-exit-notice.html is an HTML file for use with the DirPortFrontPage
|
||||
option. It tells visitors that your relay is a Tor exit node, and that they
|
||||
shouldn't assume you're the origin for the traffic that you're delivering.
|
||||
|
||||
tor.logrotate is a configuration file for use with the logrotate tool. You
|
||||
may need to edit it to work for you.
|
||||
|
||||
linux-tor-prio.sh uses Linux iptables tools to traffic-shape your Tor relay's
|
||||
traffic. If it breaks, you get to keep both pieces.
|
||||
|
||||
or-tools/ -- Tools for interacting with relays
|
||||
----------------------------------------------
|
||||
|
||||
checksocks.pl is a tool to scan relays to see if any of them have advertised
|
||||
public SOCKS ports, so we can tell them not to.
|
||||
|
||||
check-tor is a quick shell script to try doing a TLS handshake with a router
|
||||
or to try fetching a directory from it.
|
||||
|
||||
exitlist is a precursor of check.torproject.org: it parses a bunch of cached
|
||||
server descriptors to determine which can connect to a given address:port.
|
||||
|
||||
win32build -- Old files for windows packaging
|
||||
---------------------------------------------
|
||||
|
||||
You shouldn't need these unless you're building some of the older Windows
|
||||
packages.
|
|
@ -0,0 +1,65 @@
|
|||
=== AUTONAMING FOR TOR ===
|
||||
|
||||
Tor directory authorities may maintain a binding of server identities
|
||||
(their long term identity key) and nicknames. In their status documents
|
||||
they may for each router they know tell if this is indeed the owner of
|
||||
that nickname or not.
|
||||
|
||||
This toolset allows automatic maintaining of a binding list of nicknames
|
||||
to identity keys, implementing Tor proposal 123[1].
|
||||
|
||||
The rules are simple:
|
||||
- A router claiming to be Bob is named (i.e. added to the binding list)
|
||||
if there currently does not exist a different binding for that
|
||||
nickname, the router has been around for a bit (2 weeks), no other
|
||||
router has used that nickname in a while (1 month).
|
||||
- A binding is removed if the server that owns it has not been seen
|
||||
in a long time (6 months).
|
||||
|
||||
|
||||
=== REQUIREMENTS ===
|
||||
|
||||
* ruby, and its postgres DBI interface (Debian packages: ruby, ruby1.8, libdbi-ruby1.8, libdbd-pg-ruby1.8)
|
||||
* postgres (tested with >= 8.1)
|
||||
* cron
|
||||
|
||||
=== SETUP ===
|
||||
|
||||
* copy this tree some place, like into a 'auto-naming' directory in your Tor's
|
||||
data directory
|
||||
* create a database and a user, modifying db-config.rb accordingly
|
||||
* initialize the database by executing the sql statements in create-db.sql
|
||||
* setup a cronjob that feeds the current consensus to the process-consensus
|
||||
script regularly.
|
||||
* once the database is sufficiently populated, maybe a month or so after the
|
||||
previous step, setup a cronjob to regularly build the binding list using
|
||||
the build-approved-routers script. You probably want to append a manually
|
||||
managed list of rejections to that file and give it to tor as its
|
||||
"approved-routers" file.
|
||||
The Sample-Makefile and Sample-crontab demonstrate the method used at tor26.
|
||||
|
||||
|
||||
1. https://tor-svn.freehaven.net/svn/tor/trunk/doc/spec/proposals/123-autonaming.txt
|
||||
|
||||
|
||||
|
||||
|
||||
Copyright (c) 2007 Peter Palfrader
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
|
@ -0,0 +1,20 @@
|
|||
|
||||
all: ../approved-routers
|
||||
|
||||
update:
|
||||
wget -q -O - http://tor.noreply.org/tor/status-vote/current/consensus | \
|
||||
./process-consensus
|
||||
|
||||
.PHONY: approved-routers-auto
|
||||
approved-routers-auto:
|
||||
./build-approved-routers > "$@"
|
||||
|
||||
.INTERMEDIATE: approved-routers
|
||||
approved-routers: approved-routers-auto /etc/tor/approved-routers
|
||||
cat $^ > "$@"
|
||||
|
||||
../approved-routers: approved-routers
|
||||
if ! diff -q "$<" "$@"; then \
|
||||
mv "$<" "$@" &&\
|
||||
(! [ -e /var/run/tor/tor.pid ] || kill -HUP `cat /var/run/tor/tor.pid`) ; \
|
||||
fi
|
|
@ -0,0 +1,3 @@
|
|||
MAILTO=admin
|
||||
# cronjob for tor naming
|
||||
23 * * * * make -s -C auto-naming update && make -s -C auto-naming
|
|
@ -0,0 +1,45 @@
|
|||
#!/usr/bin/ruby
|
||||
|
||||
# build-approved-routers - create a name-binding list for use at a Tor
|
||||
# directory authority
|
||||
#
|
||||
# Copyright (c) 2007 Peter Palfrader
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
# in the Software without restriction, including without limitation the rights
|
||||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
# copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
# SOFTWARE.
|
||||
|
||||
require "yaml"
|
||||
|
||||
require 'db'
|
||||
require 'db-config'
|
||||
|
||||
verbose = ARGV.first == "-v"
|
||||
|
||||
db = Db.new($CONFIG['database']['dbhost'], $CONFIG['database']['dbname'], $CONFIG['database']['user'], $CONFIG['database']['password'])
|
||||
|
||||
db.transaction_begin
|
||||
named = db.query2("
|
||||
SELECT fingerprint, router_id, nickname_id, nick, first_seen, last_seen
|
||||
FROM router NATURAL JOIN router_claims_nickname NATURAL JOIN nickname
|
||||
WHERE named")
|
||||
while (n=named.next) do
|
||||
puts "# (r##{n['router_id']},n##{n['nickname_id']}); first_seen: #{n['first_seen']}, last_seen: #{n['last_seen']}"
|
||||
fpr = n['fingerprint'].split(/(....)/).delete_if{|x| x=="" }.join(' ')
|
||||
puts "#{n['nick']} #{fpr}"
|
||||
end
|
||||
db.transaction_commit
|
|
@ -0,0 +1,50 @@
|
|||
|
||||
CREATE TABLE router (
|
||||
router_id SERIAL PRIMARY KEY,
|
||||
fingerprint CHAR(40) NOT NULL,
|
||||
UNIQUE(fingerprint)
|
||||
);
|
||||
-- already created implicitly due to unique contraint
|
||||
-- CREATE INDEX router_fingerprint ON router(fingerprint);
|
||||
|
||||
CREATE TABLE nickname (
|
||||
nickname_id SERIAL PRIMARY KEY,
|
||||
nick VARCHAR(30) NOT NULL,
|
||||
UNIQUE(nick)
|
||||
);
|
||||
-- already created implicitly due to unique contraint
|
||||
-- CREATE INDEX nickname_nick ON nickname(nick);
|
||||
|
||||
CREATE TABLE router_claims_nickname (
|
||||
router_id INTEGER NOT NULL REFERENCES router(router_id) ON DELETE CASCADE,
|
||||
nickname_id INTEGER NOT NULL REFERENCES nickname(nickname_id) ON DELETE CASCADE,
|
||||
first_seen TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
last_seen TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
named BOOLEAN NOT NULL DEFAULT 'false',
|
||||
UNIQUE(router_id, nickname_id)
|
||||
);
|
||||
CREATE INDEX router_claims_nickname_router_id ON router_claims_nickname(router_id);
|
||||
CREATE INDEX router_claims_nickname_nickname_id ON router_claims_nickname(nickname_id);
|
||||
CREATE INDEX router_claims_nickname_first_seen ON router_claims_nickname(first_seen);
|
||||
CREATE INDEX router_claims_nickname_last_seen ON router_claims_nickname(last_seen);
|
||||
|
||||
|
||||
-- Copyright (c) 2007 Peter Palfrader
|
||||
--
|
||||
-- Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
-- of this software and associated documentation files (the "Software"), to deal
|
||||
-- in the Software without restriction, including without limitation the rights
|
||||
-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
-- copies of the Software, and to permit persons to whom the Software is
|
||||
-- furnished to do so, subject to the following conditions:
|
||||
--
|
||||
-- The above copyright notice and this permission notice shall be included in
|
||||
-- all copies or substantial portions of the Software.
|
||||
--
|
||||
-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
-- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
-- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
-- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
-- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
-- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
-- SOFTWARE.
|
|
@ -0,0 +1,8 @@
|
|||
$CONFIG = {} unless $CONFIG
|
||||
$CONFIG['database'] = {} unless $CONFIG['database']
|
||||
|
||||
# if you use postgres' "ident sameuser" auth set dbhost to ''
|
||||
$CONFIG['database']['dbhost'] = 'localhost';
|
||||
$CONFIG['database']['dbname'] = 'tornaming';
|
||||
$CONFIG['database']['user'] = 'tornaming';
|
||||
$CONFIG['database']['password'] = 'x';
|
|
@ -0,0 +1,165 @@
|
|||
#!/usr/bin/ruby
|
||||
|
||||
# Copyright (c) 2006, 2007 Peter Palfrader
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
# in the Software without restriction, including without limitation the rights
|
||||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
# copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
# SOFTWARE.
|
||||
|
||||
require "dbi"
|
||||
|
||||
class WeaselDbQueryHandle
|
||||
def initialize(sth)
|
||||
@sth = sth
|
||||
end
|
||||
|
||||
def next()
|
||||
row = @sth.fetch_hash
|
||||
if row
|
||||
return row
|
||||
else
|
||||
@sth.finish
|
||||
return nil
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
class Db
|
||||
def initialize(host, database, user, password)
|
||||
@dbh = DBI.connect("dbi:Pg:#{database}:#{host}", user, password);
|
||||
@dbh['AutoCommit'] = false
|
||||
@transaction = false
|
||||
@pre_initial_transaction=true
|
||||
end
|
||||
|
||||
def do(query,*args)
|
||||
@dbh.do(query,*args)
|
||||
end
|
||||
def transaction_begin()
|
||||
@dbh.do("BEGIN") unless @pre_initial_transaction
|
||||
@transaction = true
|
||||
@pre_initial_transaction=false
|
||||
end
|
||||
def transaction_commit()
|
||||
@dbh.do("COMMIT")
|
||||
@transaction = false
|
||||
end
|
||||
def transaction_rollback()
|
||||
@dbh.do("ROLLBACK")
|
||||
end
|
||||
def get_primarykey_name(table);
|
||||
#return 'ref';
|
||||
return table+'_id';
|
||||
end
|
||||
|
||||
def update(table, values, keys)
|
||||
cols = []
|
||||
vals = []
|
||||
values.each_pair{ |k,v|
|
||||
cols << "#{k}=?"
|
||||
vals << v
|
||||
}
|
||||
|
||||
wheres = []
|
||||
keys.each_pair{ |k,v|
|
||||
wheres << "#{k}=?"
|
||||
vals << v
|
||||
}
|
||||
|
||||
throw "update value set empty" unless cols.size > 0
|
||||
throw "where clause empty" unless wheres.size > 0
|
||||
|
||||
query = "UPDATE #{table} SET #{cols.join(',')} WHERE #{wheres.join(' AND ')}"
|
||||
transaction_begin unless transaction_before=@transaction
|
||||
r = @dbh.do(query, *vals)
|
||||
transaction_commit unless transaction_before
|
||||
return r
|
||||
end
|
||||
|
||||
def update_row(table, values)
|
||||
pk_name = get_primarykey_name(table);
|
||||
throw "Ref not defined" unless values[pk_name]
|
||||
return update(table, values.clone.delete_if{|k,v| k == pk_name}, { pk_name => values[pk_name] });
|
||||
end
|
||||
def insert(table, values)
|
||||
cols = values.keys
|
||||
vals = values.values
|
||||
qmarks = values.values.collect{ '?' }
|
||||
|
||||
query = "INSERT INTO #{table} (#{cols.join(',')}) VALUES (#{qmarks.join(',')})"
|
||||
transaction_begin unless transaction_before=@transaction
|
||||
@dbh.do(query, *vals)
|
||||
transaction_commit unless transaction_before
|
||||
end
|
||||
|
||||
def insert_row(table, values)
|
||||
pk_name = get_primarykey_name(table);
|
||||
if values[pk_name]
|
||||
insert(table, values)
|
||||
else
|
||||
transaction_begin unless transaction_before=@transaction
|
||||
row = query_row("SELECT nextval(pg_get_serial_sequence('#{table}', '#{pk_name}')) AS newref");
|
||||
throw "No newref?" unless row['newref']
|
||||
values[pk_name] = row['newref']
|
||||
insert(table, values);
|
||||
transaction_commit unless transaction_before
|
||||
end
|
||||
end
|
||||
def delete_row(table, ref)
|
||||
pk_name = get_primarykey_name(table);
|
||||
query = "DELETE FROM #{table} WHERE #{pk_name}=?"
|
||||
transaction_begin unless transaction_before=@transaction
|
||||
@dbh.do(query, ref)
|
||||
transaction_commit unless transaction_before
|
||||
end
|
||||
def query(query, *params)
|
||||
sth = @dbh.execute(query, *params)
|
||||
while row = sth.fetch_hash
|
||||
yield row
|
||||
end
|
||||
sth.finish
|
||||
end
|
||||
# nil if no results
|
||||
# hash if one match
|
||||
# throw otherwise
|
||||
def query_row(query, *params)
|
||||
sth = @dbh.execute(query, *params)
|
||||
|
||||
row = sth.fetch_hash
|
||||
if row == nil
|
||||
sth.finish
|
||||
return nil
|
||||
elsif sth.fetch_hash != nil
|
||||
sth.finish
|
||||
throw "More than one result when querying for #{query}"
|
||||
else
|
||||
sth.finish
|
||||
return row
|
||||
end
|
||||
end
|
||||
def query_all(query, *params)
|
||||
sth = @dbh.execute(query, *params)
|
||||
|
||||
rows = sth.fetch_all
|
||||
return nil if rows.size == 0
|
||||
return rows
|
||||
end
|
||||
def query2(query, *params)
|
||||
sth = @dbh.execute(query, *params)
|
||||
return WeaselDbQueryHandle.new(sth)
|
||||
end
|
||||
end
|
|
@ -0,0 +1,119 @@
|
|||
#!/usr/bin/ruby
|
||||
|
||||
# process-consensus - read a current consensus document, inserting the
|
||||
# information into a database then calling
|
||||
# update-named-status.rb to update the name-binding
|
||||
# flags
|
||||
#
|
||||
# Copyright (c) 2007 Peter Palfrader
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
# in the Software without restriction, including without limitation the rights
|
||||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
# copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
# SOFTWARE.
|
||||
|
||||
require "yaml"
|
||||
|
||||
require 'db'
|
||||
require 'db-config'
|
||||
require 'update-named-status'
|
||||
|
||||
$db = Db.new($CONFIG['database']['dbhost'], $CONFIG['database']['dbname'], $CONFIG['database']['user'], $CONFIG['database']['password'])
|
||||
|
||||
$router_cache = {}
|
||||
$nickname_cache = {}
|
||||
|
||||
def parse_consensus consensus
|
||||
ts = nil
|
||||
routers = []
|
||||
consensus.each do |line|
|
||||
(key, value) = line.split(' ',2)
|
||||
case key
|
||||
when "valid-after", "published": ts = DateTime.parse(value)
|
||||
when "r":
|
||||
(nick, fpr, _) = value.split(' ', 3)
|
||||
nick.downcase!
|
||||
next if nick == 'unnamed'
|
||||
routers << {
|
||||
'nick' => nick,
|
||||
'fingerprint' => (fpr+'=').unpack('m').first.unpack('H*').first
|
||||
}
|
||||
end
|
||||
end
|
||||
throw "Did not find a timestamp" unless ts
|
||||
throw "Did not find any routers" unless routers.size > 0
|
||||
return ts, routers
|
||||
end
|
||||
|
||||
def insert_routers_into_db(router, table, field, value)
|
||||
pk = table+'_id'
|
||||
row = $db.query_row("SELECT #{pk} FROM #{table} WHERE #{field}=?", value)
|
||||
if row
|
||||
return row[pk]
|
||||
else
|
||||
r = { field => value }
|
||||
$db.insert_row( table, r )
|
||||
return r[pk]
|
||||
end
|
||||
end
|
||||
|
||||
def handle_one_consensus(c)
|
||||
puts "parsing..." if $verbose
|
||||
timestamp, routers = parse_consensus c
|
||||
puts "storing..." if $verbose
|
||||
|
||||
routers.each do |router|
|
||||
fpr = router['fingerprint']
|
||||
nick = router['nick']
|
||||
$router_cache[fpr] = router_id = ($router_cache[fpr] or insert_routers_into_db(router, 'router', 'fingerprint', router['fingerprint']))
|
||||
$nickname_cache[nick] = nickname_id = ($nickname_cache[nick] or insert_routers_into_db(router, 'nickname', 'nick', router['nick']))
|
||||
|
||||
row = $db.update(
|
||||
'router_claims_nickname',
|
||||
{ 'last_seen' => timestamp.to_s },
|
||||
{ 'router_id' => router_id, 'nickname_id' => nickname_id} )
|
||||
case row
|
||||
when 0:
|
||||
$db.insert('router_claims_nickname',
|
||||
{
|
||||
'first_seen' => timestamp.to_s,
|
||||
'last_seen' => timestamp.to_s,
|
||||
'router_id' => router_id, 'nickname_id' => nickname_id} )
|
||||
when 1:
|
||||
else
|
||||
throw "Update of router_claims_nickname returned unexpected number of affected rows(#{row})"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
$db.transaction_begin
|
||||
if ARGV.first == '-v'
|
||||
$verbose = true
|
||||
ARGV.shift
|
||||
end
|
||||
|
||||
if ARGV.size == 0
|
||||
handle_one_consensus STDIN.readlines
|
||||
do_update $verbose
|
||||
else
|
||||
ARGV.each do |filename|
|
||||
puts filename if $verbose
|
||||
handle_one_consensus File.new(filename).readlines
|
||||
puts "updating..." if $verbose
|
||||
do_update $verbose
|
||||
end
|
||||
end
|
||||
$db.transaction_commit
|
|
@ -0,0 +1,70 @@
|
|||
#!/usr/bin/ruby
|
||||
|
||||
# update-named-status.rb - update the named status of routers in our database
|
||||
#
|
||||
# Copyright (c) 2007 Peter Palfrader
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
# in the Software without restriction, including without limitation the rights
|
||||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
# copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
# SOFTWARE.
|
||||
|
||||
require "yaml"
|
||||
|
||||
require 'db'
|
||||
require 'db-config'
|
||||
|
||||
def do_update(verbose)
|
||||
now = $db.query_row("SELECT max(last_seen) AS max FROM router_claims_nickname")['max']
|
||||
unless now
|
||||
STDERR.puts "Could not find the latest last_seen timestamp. Is the database empty still?"
|
||||
return
|
||||
end
|
||||
now = "TIMESTAMP '" + now.to_s + "'"
|
||||
|
||||
denamed = $db.do("
|
||||
UPDATE router_claims_nickname
|
||||
SET named=false
|
||||
WHERE named
|
||||
AND last_seen < #{now} - INTERVAL '6 months'")
|
||||
puts "de-named: #{denamed}" if verbose
|
||||
|
||||
named = $db.do("
|
||||
UPDATE router_claims_nickname
|
||||
SET named=true
|
||||
WHERE NOT named
|
||||
AND first_seen < #{now} - INTERVAL '2 weeks'
|
||||
AND last_seen > #{now} - INTERVAL '2 days'
|
||||
AND NOT EXISTS (SELECT *
|
||||
FROM router_claims_nickname AS innertable
|
||||
WHERE named
|
||||
AND router_claims_nickname.nickname_id=innertable.nickname_id) "+ # if that nickname is already named, we lose.
|
||||
" AND NOT EXISTS (SELECT *
|
||||
FROM router_claims_nickname AS innertable
|
||||
WHERE router_claims_nickname.nickname_id=innertable.nickname_id
|
||||
AND router_claims_nickname.router_id <> innertable.router_id
|
||||
AND last_seen > #{now} - INTERVAL '1 month') ") # if nobody else wanted that nickname in the last month we are set
|
||||
puts "named: #{named}" if verbose
|
||||
end
|
||||
|
||||
if __FILE__ == $0
|
||||
$db = Db.new($CONFIG['database']['dbhost'], $CONFIG['database']['dbname'], $CONFIG['database']['user'], $CONFIG['database']['password'])
|
||||
verbose = ARGV.first == "-v"
|
||||
|
||||
$db.transaction_begin
|
||||
do_update verbose
|
||||
$db.transaction_commit
|
||||
end
|
|
@ -0,0 +1,67 @@
|
|||
!include "MUI.nsh"
|
||||
!include "LogicLib.nsh"
|
||||
!include "FileFunc.nsh"
|
||||
|
||||
!define VERSION "0.2.1.13"
|
||||
!define INSTALLER "TorBundle.exe"
|
||||
!define WEBSITE "https://www.torproject.org/"
|
||||
!define LICENSE "LICENSE"
|
||||
|
||||
SetCompressor /SOLID BZIP2
|
||||
RequestExecutionLevel user
|
||||
OutFile ${INSTALLER}
|
||||
InstallDir "$LOCALAPPDATA\TorInstPkgs"
|
||||
SetOverWrite on
|
||||
Name "Tor ${VERSION} Bundle"
|
||||
Caption "Tor ${VERSION} Bundle Setup"
|
||||
BrandingText "Tor Bundle Installer"
|
||||
CRCCheck on
|
||||
XPStyle on
|
||||
ShowInstDetails hide
|
||||
VIProductVersion "${VERSION}"
|
||||
VIAddVersionKey "ProductName" "Tor"
|
||||
VIAddVersionKey "Comments" "${WEBSITE}"
|
||||
VIAddVersionKey "LegalTrademarks" "Three line BSD"
|
||||
VIAddVersionKey "LegalCopyright" "©2004-2011, Roger Dingledine, Nick Mathewson, The Tor Project, Inc."
|
||||
VIAddVersionKey "FileDescription" "Tor is an implementation of Onion Routing. You can read more at ${WEBSITE}"
|
||||
VIAddVersionKey "FileVersion" "${VERSION}"
|
||||
|
||||
!define MUI_ICON "torinst32.ico"
|
||||
!define MUI_HEADERIMAGE_BITMAP "${NSISDIR}\Contrib\Graphics\Header\win.bmp"
|
||||
!insertmacro MUI_PAGE_INSTFILES
|
||||
!insertmacro MUI_LANGUAGE "English"
|
||||
|
||||
Section "Tor" Tor
|
||||
SectionIn RO
|
||||
SetOutPath $INSTDIR
|
||||
Call ExtractPackages
|
||||
Call RunInstallers
|
||||
Call LaunchVidalia
|
||||
SectionEnd
|
||||
|
||||
Function ExtractPackages
|
||||
File "license.msi"
|
||||
File "tor.msi"
|
||||
File "torbutton.msi"
|
||||
File "thandy.msi"
|
||||
File "polipo.msi"
|
||||
File "vidalia.msi"
|
||||
File "tbcheck.bat"
|
||||
FunctionEnd
|
||||
|
||||
Function RunInstallers
|
||||
ExecWait 'msiexec /i "$INSTDIR\license.msi" /qn'
|
||||
ExecWait 'msiexec /i "$INSTDIR\tor.msi" NOSC=1 /qn'
|
||||
ExecWait 'msiexec /i "$INSTDIR\thandy.msi" NOSC=1 /qn'
|
||||
ExecWait 'msiexec /i "$INSTDIR\polipo.msi" NOSC=1 /qn'
|
||||
ExecWait 'msiexec /i "$INSTDIR\torbutton.msi" /qn'
|
||||
ExecWait 'msiexec /i "$INSTDIR\vidalia.msi" /qn'
|
||||
ExpandEnvStrings $0 %COMSPEC%
|
||||
Exec '"$0" /C "$INSTDIR\tbcheck.bat"'
|
||||
FunctionEnd
|
||||
|
||||
Function LaunchVidalia
|
||||
SetOutPath "$LOCALAPPDATA\Programs\Vidalia"
|
||||
Exec 'vidalia.exe -loglevel info -logfile log.txt'
|
||||
FunctionEnd
|
||||
|
|
@ -1,17 +1,27 @@
|
|||
#!/usr/bin/perl -w
|
||||
# $Id
|
||||
use strict;
|
||||
|
||||
my %options = ();
|
||||
my %descOptions = ();
|
||||
my %torrcSampleOptions = ();
|
||||
my %torrcCompleteOptions = ();
|
||||
my %manPageOptions = ();
|
||||
|
||||
# Load the canonical list as actually accepted by Tor.
|
||||
open(F, "@abs_top_builddir@/src/or/tor --list-torrc-options |") or die;
|
||||
my $mostRecentOption;
|
||||
open(F, "./src/or/tor --list-torrc-options |") or die;
|
||||
while (<F>) {
|
||||
next if m!\[notice\] Tor v0\.!;
|
||||
if (m!^([A-Za-z0-9_]+)!) {
|
||||
$options{$1} = 1;
|
||||
$mostRecentOption = lc $1;
|
||||
$options{$mostRecentOption} = 1;
|
||||
} elsif (m!^ !) {
|
||||
$descOptions{$mostRecentOption} = 1;
|
||||
if (m!\{DEPRECATED\}!) {
|
||||
delete $descOptions{$mostRecentOption};
|
||||
delete $options{$mostRecentOption};
|
||||
}
|
||||
} else {
|
||||
print "Unrecognized output> ";
|
||||
print;
|
||||
|
@ -19,7 +29,7 @@ while (<F>) {
|
|||
}
|
||||
close F;
|
||||
|
||||
# Load the contents of torrc.sample
|
||||
# Load the contents of torrc.sample and torrc.complete
|
||||
sub loadTorrc {
|
||||
my ($fname, $options) = @_;
|
||||
local *F;
|
||||
|
@ -27,23 +37,31 @@ sub loadTorrc {
|
|||
while (<F>) {
|
||||
next if (m!##+!);
|
||||
if (m!#([A-Za-z0-9_]+)!) {
|
||||
$options->{$1} = 1;
|
||||
$options->{lc $1} = 1;
|
||||
}
|
||||
}
|
||||
close F;
|
||||
0;
|
||||
}
|
||||
|
||||
loadTorrc("@abs_top_srcdir@/src/config/torrc.sample.in", \%torrcSampleOptions);
|
||||
loadTorrc("./src/config/torrc.sample.in", \%torrcSampleOptions);
|
||||
loadTorrc("./src/config/torrc.complete.in", \%torrcCompleteOptions);
|
||||
|
||||
# Try to figure out what's in the man page.
|
||||
|
||||
my $considerNextLine = 0;
|
||||
open(F, "@abs_top_srcdir@/doc/tor.1.txt") or die;
|
||||
open(F, "./doc/tor.1.in") or die;
|
||||
while (<F>) {
|
||||
if (m!^(?:\[\[([A-za-z0-9_]+)\]\] *)?\*\*([A-Za-z0-9_]+)\*\*!) {
|
||||
$manPageOptions{$2} = 1;
|
||||
print "Missing an anchor: $2\n" unless (defined $1 or $2 eq 'tor');
|
||||
if ($considerNextLine and
|
||||
m!^\\fB([A-Za-z0-9_]+)!) {
|
||||
$manPageOptions{lc $1} = 1;
|
||||
next;
|
||||
}
|
||||
|
||||
if (m!^\.(?:SH|TP|PP)!) {
|
||||
$considerNextLine = 1; next;
|
||||
} else {
|
||||
$considerNextLine = 0;
|
||||
}
|
||||
}
|
||||
close F;
|
||||
|
@ -60,10 +78,14 @@ sub subtractHashes {
|
|||
0;
|
||||
}
|
||||
|
||||
# subtractHashes("No online docs", \%options, \%descOptions);
|
||||
subtractHashes("No online docs", \%options, \%descOptions);
|
||||
# subtractHashes("Orphaned online docs", \%descOptions, \%options);
|
||||
|
||||
subtractHashes("Not in torrc.complete.in", \%options, \%torrcCompleteOptions);
|
||||
subtractHashes("Orphaned in torrc.complete.in", \%torrcCompleteOptions, \%options);
|
||||
subtractHashes("Orphaned in torrc.sample.in", \%torrcSampleOptions, \%options);
|
||||
|
||||
subtractHashes("Not in man page", \%options, \%manPageOptions);
|
||||
subtractHashes("Orphaned in man page", \%manPageOptions, \%options);
|
||||
|
||||
|
|
@ -0,0 +1,123 @@
|
|||
#!/usr/bin/perl -w
|
||||
|
||||
if ($ARGV[0] =~ /^-/) {
|
||||
$lang = shift @ARGV;
|
||||
$C = ($lang eq '-C');
|
||||
# $TXT = ($lang eq '-txt');
|
||||
}
|
||||
|
||||
for $fn (@ARGV) {
|
||||
open(F, "$fn");
|
||||
$lastnil = 0;
|
||||
$lastline = "";
|
||||
$incomment = 0;
|
||||
while (<F>) {
|
||||
## Warn about windows-style newlines.
|
||||
if (/\r/) {
|
||||
print " CR:$fn:$.\n";
|
||||
}
|
||||
## Warn about tabs.
|
||||
if (/\t/) {
|
||||
print " TAB:$fn:$.\n";
|
||||
}
|
||||
## Warn about trailing whitespace.
|
||||
if (/ +$/) {
|
||||
print "Space\@EOL:$fn:$.\n";
|
||||
}
|
||||
## Warn about control keywords without following space.
|
||||
if ($C && /\s(?:if|while|for|switch)\(/) {
|
||||
print " KW(:$fn:$.\n";
|
||||
}
|
||||
## Warn about #else #if instead of #elif.
|
||||
if (($lastline =~ /^\# *else/) and ($_ =~ /^\# *if/)) {
|
||||
print " #else#if:$fn:$.\n";
|
||||
}
|
||||
$lastline = $_;
|
||||
## Warn about multiple empty lines.
|
||||
if ($lastnil && /^$/) {
|
||||
print " DoubleNL:$fn:$.\n";
|
||||
} elsif (/^$/) {
|
||||
$lastnil = 1;
|
||||
} else {
|
||||
$lastnil = 0;
|
||||
}
|
||||
## Terminals are still 80 columns wide in my world. I refuse to
|
||||
## accept double-line lines. Except, of course, svn Id tags
|
||||
## can make us go long.
|
||||
if (/^.{80}/ && !/\$Id: /) {
|
||||
print " Wide:$fn:$.\n";
|
||||
}
|
||||
### Juju to skip over comments and strings, since the tests
|
||||
### we're about to do are okay there.
|
||||
if ($C) {
|
||||
if ($incomment) {
|
||||
if (m!\*/!) {
|
||||
s!.*?\*/!!;
|
||||
$incomment = 0;
|
||||
} else {
|
||||
next;
|
||||
}
|
||||
}
|
||||
if (m!/\*.*?\*/!) {
|
||||
s!\s*/\*.*?\*/!!;
|
||||
} elsif (m!/\*!) {
|
||||
s!\s*/\*!!;
|
||||
$incomment = 1;
|
||||
next;
|
||||
}
|
||||
s!"(?:[^\"]+|\\.)*"!"X"!g;
|
||||
next if /^\#/;
|
||||
## Warn about C++-style comments.
|
||||
if (m!//!) {
|
||||
# print " //:$fn:$.\n";
|
||||
s!//.*!!;
|
||||
}
|
||||
## Warn about unquoted braces preceded by non-space.
|
||||
if (/([^\s'])\{/) {
|
||||
print " $1\{:$fn:$.\n";
|
||||
}
|
||||
## Warn about multiple internal spaces.
|
||||
#if (/[^\s,:]\s{2,}[^\s\\=]/) {
|
||||
# print " X X:$fn:$.\n";
|
||||
#}
|
||||
## Warn about { with stuff after.
|
||||
#s/\s+$//;
|
||||
#if (/\{[^\}\\]+$/) {
|
||||
# print " {X:$fn:$.\n";
|
||||
#}
|
||||
## Warn about function calls with space before parens.
|
||||
if (/(\w+)\s\(([A-Z]*)/) {
|
||||
if ($1 ne "if" and $1 ne "while" and $1 ne "for" and
|
||||
$1 ne "switch" and $1 ne "return" and $1 ne "int" and
|
||||
$1 ne "elsif" and $1 ne "WINAPI" and $2 ne "WINAPI" and
|
||||
$1 ne "void" and $1 ne "__attribute__") {
|
||||
print " fn ():$fn:$.\n";
|
||||
}
|
||||
}
|
||||
## Warn about functions not declared at start of line.
|
||||
if ($in_func_head ||
|
||||
($fn !~ /\.h$/ && /^[a-zA-Z0-9_]/ &&
|
||||
! /^(?:const |static )*(?:typedef|struct|union)[^\(]*$/ &&
|
||||
! /= *\{$/ && ! /;$/)) {
|
||||
if (/.\{$/){
|
||||
print "fn() {:$fn:$.\n";
|
||||
$in_func_head = 0;
|
||||
} elsif (/^\S[^\(]* +\**[a-zA-Z0-9_]+\(/) {
|
||||
$in_func_head = -1; # started with tp fn
|
||||
} elsif (/;$/) {
|
||||
$in_func_head = 0;
|
||||
} elsif (/\{/) {
|
||||
if ($in_func_head == -1) {
|
||||
print "tp fn():$fn:$.\n";
|
||||
}
|
||||
$in_func_head = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (! $lastnil) {
|
||||
print " EOL\@EOF:$fn:$.\n";
|
||||
}
|
||||
close(F);
|
||||
}
|
||||
|
|
@ -1,103 +0,0 @@
|
|||
# clang sanitizer special case list
|
||||
# syntax specified in http://clang.llvm.org/docs/SanitizerSpecialCaseList.html
|
||||
# for more info see http://clang.llvm.org/docs/AddressSanitizer.html
|
||||
|
||||
#
|
||||
# Tor notes: This file is obsolete!
|
||||
#
|
||||
# It was necessary in order to apply the sanitizers to all of tor. But
|
||||
# we don't believe that's a good idea: some parts of tor need constant-time
|
||||
# behavior that is hard to guarantee with these sanitizers.
|
||||
#
|
||||
# If you need this behavior, then please consider --enable-expensive-hardening,
|
||||
# and report bugs as needed.
|
||||
#
|
||||
|
||||
# usage:
|
||||
# 1. configure tor build:
|
||||
# ./configure \
|
||||
# CC=clang \
|
||||
# CFLAGS="-fsanitize-blacklist=contrib/clang/sanitize_blacklist.txt -fsanitize=undefined -fsanitize=address -fno-sanitize-recover=all -fno-omit-frame-pointer -fno-optimize-sibling-calls -fno-inline" \
|
||||
# LDFLAGS="-fsanitize=address" \
|
||||
# --disable-gcc-hardening
|
||||
# and any other flags required to build tor on your OS.
|
||||
#
|
||||
# 2. build tor:
|
||||
# make
|
||||
#
|
||||
# 3. test tor:
|
||||
# ASAN_OPTIONS=allow_user_segv_handler=1 make test
|
||||
# ASAN_OPTIONS=allow_user_segv_handler=1 make check
|
||||
# make test-network # requires chutney
|
||||
#
|
||||
# 4. the tor binary is now instrumented with clang sanitizers,
|
||||
# and can be run just like a standard tor binary
|
||||
|
||||
# Compatibility:
|
||||
# This blacklist has been tested with clang 3.7's UndefinedBehaviorSanitizer
|
||||
# and AddressSanitizer on OS X 10.10 Yosemite, with all tests passing
|
||||
# on both x86_64 and i386 (using CC="clang -arch i386")
|
||||
# It has not been tested with ThreadSanitizer or MemorySanitizer
|
||||
# Success report and patches for other sanitizers or OSs are welcome
|
||||
|
||||
# ccache and make don't account for the sanitizer blacklist as a dependency
|
||||
# you might need to set CCACHE_DISABLE=1 and/or use make clean to workaround
|
||||
|
||||
# Configuration Flags:
|
||||
# -fno-sanitize-recover=all
|
||||
# causes clang to crash on undefined behavior, rather than printing
|
||||
# a warning and continuing (the AddressSanitizer always crashes)
|
||||
# -fno-omit-frame-pointer -fno-optimize-sibling-calls -fno-inline
|
||||
# make clang backtraces easier to read
|
||||
# --disable-gcc-hardening
|
||||
# disables warnings about the redefinition of _FORTIFY_SOURCE
|
||||
# (it conflicts with the sanitizers)
|
||||
|
||||
# Turning the sanitizers off for particular functions:
|
||||
# (Unfortunately, exempting functions doesn't work for the blacklisted
|
||||
# functions below, and we can't turn the code off because it's essential)
|
||||
#
|
||||
# #if defined(__has_feature)
|
||||
# #if __has_feature(address_sanitizer)
|
||||
# /* tell clang AddressSanitizer not to instrument this function */
|
||||
# #define NOASAN __attribute__((no_sanitize_address))
|
||||
# #define _CLANG_ASAN_
|
||||
# #else
|
||||
# #define NOASAN
|
||||
# #endif
|
||||
# #else
|
||||
# #define NOASAN
|
||||
# #endif
|
||||
#
|
||||
# /* Telling AddressSanitizer to not instrument a function */
|
||||
# void func(void) NOASAN;
|
||||
#
|
||||
# /* Including or excluding sections of code */
|
||||
# #ifdef _CLANG_ASAN_
|
||||
# /* code that only runs under address sanitizer */
|
||||
# #else
|
||||
# /* code that doesn't run under address sanitizer */
|
||||
# #endif
|
||||
|
||||
# Blacklist Entries:
|
||||
|
||||
# test-memwipe.c checks if a freed buffer was properly wiped
|
||||
fun:vmemeq
|
||||
fun:check_a_buffer
|
||||
|
||||
# we need to allow the tor bt handler to catch SIGSEGV
|
||||
# otherwise address sanitizer munges the expected output and the test fails
|
||||
# we can do this by setting an environmental variable
|
||||
# See https://code.google.com/p/address-sanitizer/wiki/Flags
|
||||
# ASAN_OPTIONS=allow_user_segv_handler=1
|
||||
|
||||
# test_bt_cl.c stores to a NULL pointer to trigger a crash
|
||||
fun:crash
|
||||
|
||||
# curve25519-donna.c left-shifts 1 bits into and past the sign bit of signed
|
||||
# integers. Until #13538 is resolved, we exempt functions that do left shifts.
|
||||
# Note that x86_64 uses curve25519-donna-c64.c instead of curve25519-donna.c
|
||||
fun:freduce_coefficients
|
||||
fun:freduce_degree
|
||||
fun:s32_eq
|
||||
fun:fcontract
|
|
@ -1,61 +0,0 @@
|
|||
#! /bin/sh
|
||||
|
||||
# This script used to call (the now deprecated) tsocks as a fallback in case
|
||||
# torsocks wasn't installed.
|
||||
# Now, it's just a backwards compatible shim around torsocks with reasonable
|
||||
# behavior if -v/--verbose or -h/--help arguments are passed.
|
||||
#
|
||||
# Copyright (c) 2004, 2006, 2009 Peter Palfrader
|
||||
# Modified by Jacob Appelbaum <jacob@appelbaum.net> April 16th 2006
|
||||
# Stripped of all the tsocks cruft by ugh on February 22nd 2012
|
||||
# May be distributed under the same terms as Tor itself
|
||||
|
||||
|
||||
compat() {
|
||||
echo "torify is now just a wrapper around torsocks(1) for backwards compatibility."
|
||||
}
|
||||
|
||||
usage() {
|
||||
compat
|
||||
echo "Usage: $0 [-hv] <command> [<options>...]"
|
||||
}
|
||||
|
||||
case $# in 0)
|
||||
usage >&2
|
||||
exit 1
|
||||
esac
|
||||
|
||||
case $# in 1)
|
||||
case $1 in -h|--help)
|
||||
usage
|
||||
exit 0
|
||||
esac
|
||||
esac
|
||||
|
||||
case $1 in -v|--verbose)
|
||||
compat >&2
|
||||
shift
|
||||
esac
|
||||
|
||||
# taken from Debian's Developer's Reference, 6.4
|
||||
pathfind() {
|
||||
OLDIFS="$IFS"
|
||||
IFS=:
|
||||
for p in $PATH; do
|
||||
if [ -x "$p/$*" ]; then
|
||||
IFS="$OLDIFS"
|
||||
return 0
|
||||
fi
|
||||
done
|
||||
IFS="$OLDIFS"
|
||||
return 1
|
||||
}
|
||||
|
||||
if pathfind torsocks; then
|
||||
exec torsocks "$@"
|
||||
echo "$0: Failed to exec torsocks $@" >&2
|
||||
exit 1
|
||||
else
|
||||
echo "$0: torsocks not found in your PATH. Perhaps it isn't installed? (tsocks is no longer supported, for security reasons.)" >&2
|
||||
fi
|
||||
|
|
@ -0,0 +1,196 @@
|
|||
#!/bin/bash
|
||||
# $Id$
|
||||
# Copyright 2006 Michael Mohr with modifications by Roger Dingledine
|
||||
# See LICENSE for licensing information.
|
||||
|
||||
#######################################################################
|
||||
# Tor-cross: a tool to help cross-compile Tor
|
||||
#
|
||||
# The purpose of a cross-compiler is to produce an executable for
|
||||
# one system (CPU) on another. This is useful, for example, when
|
||||
# the target system does not have a native compiler available.
|
||||
# You might, for example, wish to cross-compile a program on your
|
||||
# host (the computer you're working on now) for a target such as
|
||||
# a router or handheld computer.
|
||||
#
|
||||
# A number of environment variables must be set in order for this
|
||||
# script to work:
|
||||
# $PREFIX, $CROSSPATH, $HOST_TRIPLET, $HOST,
|
||||
# and (optionally) $BUILD
|
||||
# Please run the script for a description of each one. If automated
|
||||
# builds are desired, the above variables can be exported at the top
|
||||
# of this script.
|
||||
#
|
||||
# Recent releases of Tor include test programs in configure. Normally
|
||||
# this is a good thing, since it catches a number of problems.
|
||||
# However, this also presents a problem when cross compiling, since
|
||||
# you can't run binary images for the target system on the host.
|
||||
#
|
||||
# Tor-cross assumes that you know what you're doing and removes a
|
||||
# number of checks known to cause problems with this process.
|
||||
# Note that this does not guarantee that the program will run or
|
||||
# even compile; it simply allows configure to generate the Makefiles.
|
||||
#
|
||||
# Stripping the binaries should almost always be done for an
|
||||
# embedded environment where space is at an exacting premium.
|
||||
# However, the default is NOT to strip them since they are useful for
|
||||
# debugging. If you do not plan to do any debugging and you
|
||||
# don't care about the debugging symbols, set $STRIP to "yes" before
|
||||
# running this script.
|
||||
#
|
||||
# Tor-cross was written by Michael Mohr. He can be contacted at
|
||||
# m(dot)mohr(at)laposte(dot)net. Comments are appreciated, but
|
||||
# flames go to /dev/null.
|
||||
#
|
||||
# The target with which this script is tested is little-endian
|
||||
# MIPS Linux, built on an Athlon-based Linux desktop.
|
||||
#
|
||||
#######################################################################
|
||||
|
||||
# disable the platform-specific tests in configure
|
||||
export CROSS_COMPILE=yes
|
||||
|
||||
# for error conditions
|
||||
EXITVAL=0
|
||||
|
||||
if [ ! -f autogen.sh ]
|
||||
then
|
||||
echo "Please run this script from the root of the Tor distribution"
|
||||
exit -1
|
||||
fi
|
||||
|
||||
if [ ! -f configure ]
|
||||
then
|
||||
if [ -z $GEN_BUILD ]
|
||||
then
|
||||
echo "To automatically generate the build environment, set \$GEN_BUILD"
|
||||
echo "to yes; for example,"
|
||||
echo " export GEN_BUILD=yes"
|
||||
EXITVAL=-1
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -z $PREFIX ]
|
||||
then
|
||||
echo "You must define \$PREFIX since you are cross-compiling."
|
||||
echo "Select a non-system location (i.e. /tmp/tor-cross):"
|
||||
echo " export PREFIX=/tmp/tor-cross"
|
||||
EXITVAL=-1
|
||||
fi
|
||||
|
||||
if [ -z $CROSSPATH ]
|
||||
then
|
||||
echo "You must define the location of your cross-compiler's"
|
||||
echo "directory using \$CROSSPATH; for example,"
|
||||
echo " export CROSSPATH=/opt/cross/staging_dir_mipsel/bin"
|
||||
EXITVAL=-1
|
||||
fi
|
||||
|
||||
if [ -z $HOST_TRIPLET ]
|
||||
then
|
||||
echo "You must define \$HOST_TRIPLET to continue. For example,"
|
||||
echo "if you normally cross-compile applications using"
|
||||
echo "mipsel-linux-uclibc-gcc, you would set \$HOST_TRIPLET like so:"
|
||||
echo " export HOST_TRIPLET=mipsel-linux-uclibc-"
|
||||
EXITVAL=-1
|
||||
fi
|
||||
|
||||
if [ -z $HOST ]
|
||||
then
|
||||
echo "You must specify a target processor with \$HOST; for example:"
|
||||
echo " export HOST=mipsel-unknown-elf"
|
||||
EXITVAL=-1
|
||||
fi
|
||||
|
||||
if [ -z $BUILD ]
|
||||
then
|
||||
echo "You should specify the host machine's type with \$BUILD; for example:"
|
||||
echo " export BUILD=i686-pc-linux-gnu"
|
||||
echo "If you wish to let configure autodetect the host, set \$BUILD to 'auto':"
|
||||
echo " export BUILD=auto"
|
||||
EXITVAL=-1
|
||||
fi
|
||||
|
||||
if [ ! -x $CROSSPATH/$HOST_TRIPLETgcc ]
|
||||
then
|
||||
echo "The specified toolchain does not contain an executable C compiler."
|
||||
echo "Please double-check your settings and rerun cross.sh."
|
||||
EXITVAL=-1
|
||||
fi
|
||||
|
||||
if [ $EXITVAL -ne 0 ]
|
||||
then
|
||||
echo "Remember, you can hard-code these values in cross.sh if needed."
|
||||
exit $EXITVAL
|
||||
fi
|
||||
|
||||
if [ ! -z "$GEN_BUILD" -a ! -f configure ]
|
||||
then
|
||||
export NOCONF=yes
|
||||
./autogen.sh
|
||||
fi
|
||||
|
||||
# clean up any existing object files
|
||||
if [ -f src/or/tor ]
|
||||
then
|
||||
make clean
|
||||
fi
|
||||
|
||||
# Set up the build environment and try to run configure
|
||||
export PATH=$PATH:$CROSSPATH
|
||||
export RANLIB=${HOST_TRIPLET}ranlib
|
||||
export CC=${HOST_TRIPLET}gcc
|
||||
|
||||
if [ $BUILD == "auto" ]
|
||||
then
|
||||
./configure \
|
||||
--enable-debug \
|
||||
--enable-eventdns \
|
||||
--prefix=$PREFIX \
|
||||
--host=$HOST
|
||||
else
|
||||
./configure \
|
||||
--enable-debug \
|
||||
--enable-eventdns \
|
||||
--prefix=$PREFIX \
|
||||
--host=$HOST \
|
||||
--build=$BUILD
|
||||
fi
|
||||
|
||||
# has a problem occurred?
|
||||
if [ $? -ne 0 ]
|
||||
then
|
||||
echo ""
|
||||
echo "A problem has been detected with configure."
|
||||
echo "Please check the output above and rerun cross.sh"
|
||||
echo ""
|
||||
exit -1
|
||||
fi
|
||||
|
||||
# Now we're cookin'
|
||||
|
||||
make
|
||||
|
||||
# has a problem occurred?
|
||||
if [ $? -ne 0 ]
|
||||
then
|
||||
echo ""
|
||||
echo "A problem has been detected with make."
|
||||
echo "Please check the output above and rerun make."
|
||||
echo ""
|
||||
exit -1
|
||||
fi
|
||||
|
||||
# if $STRIP has length (i.e. STRIP=yes), strip the binaries
|
||||
if [ ! -z $STRIP ]
|
||||
then
|
||||
${HOST_TRIPLET}strip \
|
||||
src/or/tor \
|
||||
src/or/test \
|
||||
src/tools/tor-resolve
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo "Tor should be compiled at this point. Now run 'make install' to"
|
||||
echo "install to $PREFIX"
|
||||
echo ""
|
|
@ -0,0 +1,3 @@
|
|||
10 * * * * cd projects/tor-v2dir && ./fetch-all-v3
|
||||
40 * * * * cd projects/tor-v2dir && ./fetch-all
|
||||
15 3 6 * * cd projects/tor-v2dir && ./sort-into-month-folder > /dev/null && ./tar-them-up last > /dev/null
|
|
@ -0,0 +1,77 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Download all current v2 directory status documents, then download
|
||||
# the descriptors and extra info documents.
|
||||
|
||||
# Copyright (c) 2005, 2006, 2007, 2008 Peter Palfrader
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
# in the Software without restriction, including without limitation the rights
|
||||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
# copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
# SOFTWARE.
|
||||
|
||||
TZ=UTC
|
||||
export TZ
|
||||
|
||||
DIRSERVERS=""
|
||||
DIRSERVERS="$DIRSERVERS 86.59.21.38:80" # tor26
|
||||
DIRSERVERS="$DIRSERVERS 128.31.0.34:9031" # moria1
|
||||
DIRSERVERS="$DIRSERVERS 128.31.0.34:9032" # moria2
|
||||
DIRSERVERS="$DIRSERVERS 194.109.206.212:80" # dizum
|
||||
|
||||
DATEDIR=$(date "+%Y/%m/%d")
|
||||
TIME=$(date "+%Y%m%d-%H%M%S")
|
||||
|
||||
. fetch-all-functions
|
||||
|
||||
statuses=""
|
||||
for dirserver in $DIRSERVERS; do
|
||||
authorities=$(wget -q -O - http://$dirserver/tor/status/all | egrep '^fingerprint ' | awk '{print $2}')
|
||||
if [ "$authorities" == "" ]; then
|
||||
echo "Did not get a list of authorities from $dirserver, going to next" 2>&1
|
||||
continue
|
||||
fi
|
||||
|
||||
dir="status/$DATEDIR"
|
||||
[ -d "$dir" ] || mkdir -p "$dir"
|
||||
|
||||
authprefix="$dir/$TIME-"
|
||||
for fp in $authorities; do
|
||||
wget -q -O "$authprefix$fp" http://$dirserver/tor/status/fp/"$fp"
|
||||
bzip2 "$authprefix$fp"
|
||||
statuses="$statuses $authprefix$fp.bz2"
|
||||
done
|
||||
if [ "$statuses" == "" ]; then
|
||||
echo "Did not get any statuses from $dirserver, going to next" 2>&1
|
||||
continue
|
||||
else
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
if [ "$statuses" = "" ]; then
|
||||
echo "No statuses available" 2>&1
|
||||
exit 1
|
||||
fi
|
||||
|
||||
digests=$( for i in ` bzcat $statuses | awk '$1 == "r" {printf "%s=\n", $4}' | sort -u `; do
|
||||
echo $i | \
|
||||
base64-decode | \
|
||||
perl -e 'undef $/; $a=<>; print unpack("H\*", $a),"\n";';
|
||||
done )
|
||||
for digest in $digests; do
|
||||
fetch_digest "$digest" "server-descriptor"
|
||||
done
|
|
@ -0,0 +1,82 @@
|
|||
#!/bin/bash
|
||||
|
||||
# function used by fetch-all* to download server descriptors and
|
||||
# extra info documents
|
||||
|
||||
# Copyright (c) 2005, 2006, 2007, 2008 Peter Palfrader
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
# in the Software without restriction, including without limitation the rights
|
||||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
# copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
# SOFTWARE.
|
||||
|
||||
|
||||
fetch_digest() {
|
||||
local digest
|
||||
local objecttype
|
||||
local urlpart
|
||||
local pathpart
|
||||
local target
|
||||
local targetdir
|
||||
local dirserver
|
||||
local ei
|
||||
|
||||
digest="$1"
|
||||
objecttype="$2"
|
||||
if [ "$objecttype" = "server-descriptor" ] ; then
|
||||
urlpart="server"
|
||||
pathpart="server-descriptor"
|
||||
elif [ "$objecttype" = "extra-info" ] ; then
|
||||
urlpart="extra"
|
||||
pathpart="extra-info"
|
||||
else
|
||||
echo "Called fetch_digest with illegal objecttype '$objecttype'" >&2
|
||||
exit 1
|
||||
fi
|
||||
target=$( echo $digest | sed -e 's#^\(.\)\(.\)#'"$pathpart"'/\1/\2/\1\2#' )
|
||||
targetdir=$( dirname $target )
|
||||
[ -d "$targetdir" ] || mkdir -p "$targetdir"
|
||||
if ! [ -e "$target" ]; then
|
||||
for dirserver in $DIRSERVERS; do
|
||||
wget -q -O "$target" http://$dirserver/tor/$urlpart/d/"$digest" || rm -f "$target"
|
||||
if [ -s "$target" ]; then
|
||||
if egrep '^opt extra-info-digest ' "$target" > /dev/null; then
|
||||
ei=$( egrep '^opt extra-info-digest ' "$target" | awk '{print $3}' | tr 'A-F' 'a-f' )
|
||||
fetch_digest "$ei" "extra-info"
|
||||
elif egrep '^extra-info-digest ' "$target" > /dev/null; then
|
||||
ei=$( egrep '^extra-info-digest ' "$target" | awk '{print $2}' | tr 'A-F' 'a-f' )
|
||||
fetch_digest "$ei" "extra-info"
|
||||
fi
|
||||
break
|
||||
else
|
||||
rm -f "$target"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
#if ! [ -e "$target" ]; then
|
||||
# echo "$objecttype $digest" >> failed
|
||||
#fi
|
||||
}
|
||||
|
||||
if [ -x /usr/bin/base64 ] ; then
|
||||
base64-decode() {
|
||||
/usr/bin/base64 -d
|
||||
}
|
||||
else
|
||||
base64-decode() {
|
||||
perl -MMIME::Base64 -e 'print decode_base64(<>)'
|
||||
}
|
||||
fi
|
|
@ -0,0 +1,111 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Download all current v3 directory status votes and the consensus document,
|
||||
# then download the descriptors and extra info documents.
|
||||
|
||||
# Copyright (c) 2005, 2006, 2007, 2008 Peter Palfrader
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
# in the Software without restriction, including without limitation the rights
|
||||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
# copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
# SOFTWARE.
|
||||
|
||||
TZ=UTC
|
||||
export TZ
|
||||
|
||||
DIRSERVERS=""
|
||||
DIRSERVERS="$DIRSERVERS 86.59.21.38:80" # tor26
|
||||
DIRSERVERS="$DIRSERVERS 128.31.0.34:9031" # moria1
|
||||
DIRSERVERS="$DIRSERVERS 216.224.124.114:9030" # ides
|
||||
DIRSERVERS="$DIRSERVERS 80.190.246.100:80" # gabelmoo
|
||||
#DIRSERVERS="$DIRSERVERS 140.247.60.64:80" # lefkada
|
||||
DIRSERVERS="$DIRSERVERS 194.109.206.212:80" # dizum
|
||||
#DIRSERVERS="$DIRSERVERS 128.31.0.34:9032" # moria2
|
||||
DIRSERVERS="$DIRSERVERS 213.73.91.31:80" # dannenberg
|
||||
DIRSERVERS="$DIRSERVERS 208.83.223.34:443" # urras
|
||||
TIME=$(date "+%Y%m%d-%H%M%S")
|
||||
|
||||
. fetch-all-functions
|
||||
|
||||
consensus=""
|
||||
tmpdir="consensus/tmp"
|
||||
[ -d "$tmpdir" ] || mkdir -p "$tmpdir"
|
||||
for dirserver in $DIRSERVERS; do
|
||||
wget -q -O "$tmpdir/$TIME-consensus" http://$dirserver/tor/status-vote/current/consensus
|
||||
if [ "$?" != 0 ]; then
|
||||
rm -f "$tmpdir/$TIME-consensus"
|
||||
continue
|
||||
fi
|
||||
|
||||
freshconsensus="$tmpdir/$TIME-consensus"
|
||||
|
||||
timestamp=$(awk '$1=="valid-after" {printf "%s-%s", $2, $3}' < "$freshconsensus")
|
||||
datedir=$(awk '$1=="valid-after" {printf "%s", $2}' < "$freshconsensus" | tr '-' '/')
|
||||
dir="consensus/$datedir"
|
||||
[ -d "$dir" ] || mkdir -p "$dir"
|
||||
|
||||
|
||||
consensus="$dir/$timestamp-consensus.bz2"
|
||||
if ! [ -e "$consensus" ]; then
|
||||
# the consensus is new, or at least we don't have it yet
|
||||
bzip2 "$freshconsensus"
|
||||
mv "$freshconsensus.bz2" "$consensus"
|
||||
break
|
||||
fi
|
||||
|
||||
rm -f "$freshconsensus"
|
||||
echo "Consensus from $timestamp (gotten from $dirserver) already exists!" >&2
|
||||
# maybe there is a newer one on a different authority, so try again.
|
||||
done
|
||||
|
||||
if [ "$consensus" = "" ]; then
|
||||
echo "No consensus available" 2>&1
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
votes=$(bzcat $consensus | awk '$1 == "vote-digest" {print $2}')
|
||||
for vote in $votes; do
|
||||
for dirserver in $DIRSERVERS; do
|
||||
wget -q -O "$dir/$TIME-vote-$vote" http://$dirserver/tor/status-vote/current/d/$vote
|
||||
if [ "$?" != 0 ]; then
|
||||
rm -f "$dir/$TIME-vote-$vote"
|
||||
continue
|
||||
fi
|
||||
break
|
||||
done
|
||||
if [ -e "$dir/$TIME-vote-$vote" ]; then
|
||||
voteridentity=$(awk '$1=="fingerprint" {print $2}' < "$dir/$TIME-vote-$vote")
|
||||
if [ -e "$dir/$timestamp-vote-$voteridentity-$vote.bz2" ]; then
|
||||
echo "Vote $vote from $voteridentity already exists!" >&2
|
||||
rm -f "$dir/$TIME-vote-$vote"
|
||||
continue;
|
||||
fi
|
||||
mv "$dir/$TIME-vote-$vote" "$dir/$timestamp-vote-$voteridentity-$vote"
|
||||
bzip2 "$dir/$timestamp-vote-$voteridentity-$vote"
|
||||
else
|
||||
echo "Failed to get vote $vote!" >&2
|
||||
fi
|
||||
done
|
||||
|
||||
digests=$( for i in ` bzcat $consensus | awk '$1 == "r" {printf "%s=\n", $4}' | sort -u `; do
|
||||
echo $i | \
|
||||
base64-decode | \
|
||||
perl -e 'undef $/; $a=<>; print unpack("H\*", $a),"\n";';
|
||||
done )
|
||||
for digest in $digests; do
|
||||
fetch_digest "$digest" "server-descriptor"
|
||||
done
|
|
@ -0,0 +1,74 @@
|
|||
#!/usr/bin/perl -w
|
||||
|
||||
# Sort dumped consensuses, statuses, descriptors etc into per-month folders.
|
||||
|
||||
# Copyright (c) 2006, 2007, 2008 Peter Palfrader
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
# in the Software without restriction, including without limitation the rights
|
||||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
# copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
# SOFTWARE.
|
||||
|
||||
use strict;
|
||||
use File::Find;
|
||||
use File::Basename;
|
||||
use File::stat;
|
||||
use Time::Local;
|
||||
|
||||
|
||||
my $cutofftime;
|
||||
|
||||
|
||||
sub wanted() {
|
||||
return unless -f;
|
||||
my $mtime = stat($_)->mtime;
|
||||
return if $mtime >= $cutofftime;
|
||||
|
||||
my (undef,undef,undef,undef,$mon,$year,undef,undef,undef) = gmtime $mtime;
|
||||
|
||||
my $bn = basename $_;
|
||||
my $dn = dirname $_;
|
||||
my @path = split /\//, $dn;
|
||||
$path[0] .= sprintf 's-%4d-%02d', 1900+$year, $mon+1;
|
||||
$dn = join '/', @path;
|
||||
|
||||
if (! -d $dn) {
|
||||
my $p = '.';
|
||||
for my $component (@path) {
|
||||
$p .= '/'.$component;
|
||||
if (! -d $p) {
|
||||
mkdir $p or die ("Cannot mkdir $p: $!\n");
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
print "$_ -> $dn/$bn\n";
|
||||
rename $_, $dn.'/'.$bn or die ("Cannot rename $_ to $dn/$bn: $!\n");
|
||||
};
|
||||
|
||||
my (undef,undef,undef,undef,$mon,$year,undef,undef,undef) = gmtime(time - 5*24*3600);
|
||||
$cutofftime = timegm(0,0,0,1,$mon,$year);
|
||||
find( {
|
||||
wanted => \&wanted,
|
||||
no_chdir => 1
|
||||
},
|
||||
'server-descriptor');
|
||||
|
||||
find( {
|
||||
wanted => \&wanted,
|
||||
no_chdir => 1
|
||||
},
|
||||
'extra-info');
|
|
@ -0,0 +1,127 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Tar up dumped consensuses, statuses, descriptors etc from per-month folders
|
||||
# into per-month tarballs.
|
||||
|
||||
# Copyright (c) 2006, 2007, 2008 Peter Palfrader
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
# in the Software without restriction, including without limitation the rights
|
||||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
# copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
# SOFTWARE.
|
||||
|
||||
set -e
|
||||
set -x
|
||||
set -u
|
||||
|
||||
usage() {
|
||||
echo "Usage: $0 <year> <month>" >&2
|
||||
echo " $0 last (does last month)" >&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
if [ -z "${1:-}" ]; then
|
||||
usage
|
||||
fi
|
||||
|
||||
if [ "$1" = "last" ]; then
|
||||
year=`date --date="last month" +'%Y'`
|
||||
month=`date --date="last month" +'%m'`
|
||||
elif [ -z "${2:-}" ]; then
|
||||
usage
|
||||
else
|
||||
year="$1"
|
||||
month="$2"
|
||||
fi
|
||||
|
||||
if [ "$year" -lt 2000 ] || [ "$year" -gt 2020 ] ||
|
||||
[ "$month" -lt 1 ] || [ "$month" -gt 12 ] ||
|
||||
[ "`echo -n $month | wc -c`" != 2 ]; then
|
||||
usage
|
||||
fi
|
||||
|
||||
|
||||
this_year=`date --utc +'%Y'`
|
||||
this_month=`date --utc +'%m'`
|
||||
|
||||
if [ "`date -d $this_year-$this_month-01 +%s`" -le "`date -d $year-$month-01 +%s`" ]; then
|
||||
echo "Date in the future or current month?" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
for file in \
|
||||
"extra-infos-$year-$month.tar.bz2" \
|
||||
"server-descriptors-$year-$month.tar.bz2" \
|
||||
"consensuses-$year-$month.tar.bz2" \
|
||||
"statuses-$year-$month.tar.bz2" \
|
||||
; do
|
||||
if [ -e "$file" ]; then
|
||||
echo "$file already exists" >&2
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
for dir in \
|
||||
"extra-infos-$year-$month" \
|
||||
"server-descriptors-$year-$month" \
|
||||
"consensus/$year/$month" \
|
||||
"status/$year/$month" \
|
||||
; do
|
||||
if ! [ -d "$dir" ]; then
|
||||
echo "$dir not found" >&2
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
for dir in \
|
||||
"consensuses-$year-$month" \
|
||||
"statuses-$year-$month" \
|
||||
; do
|
||||
if [ -e "$dir" ]; then
|
||||
echo "$dir already exists" >&2
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
for kind in consensus status; do
|
||||
mv "$kind"/$year/$month "$kind"es-$year-$month
|
||||
find "$kind"es-$year-$month -type f -name '*.bz2' -print0 | xargs -0 bunzip2 -v
|
||||
tar cjvf "$kind"es-$year-$month.tar.bz2 "$kind"es-$year-$month
|
||||
rm -rf "$kind"es-$year-$month
|
||||
done
|
||||
|
||||
for kind in extra-infos server-descriptors; do
|
||||
tar cjvf "$kind"-$year-$month.tar.bz2 "$kind"-$year-$month
|
||||
rm -rf "$kind"-$year-$month
|
||||
done
|
||||
|
||||
|
||||
|
||||
[ -d Archive ] || mkdir Archive
|
||||
|
||||
for kind in consensus status; do
|
||||
t="$kind"es-$year-$month.tar.bz2
|
||||
! [ -e Archive/"$t" ] && mv "$t" Archive/"$t"
|
||||
done
|
||||
|
||||
for kind in extra-infos server-descriptors; do
|
||||
t="$kind"-$year-$month.tar.bz2
|
||||
! [ -e Archive/"$t" ] && mv "$t" Archive/"$t"
|
||||
done
|
|
@ -1,35 +0,0 @@
|
|||
# tor.service -- this systemd configuration file for Tor sets up a
|
||||
# relatively conservative, hardened Tor service. You may need to
|
||||
# edit it if you are making changes to your Tor configuration that it
|
||||
# does not allow. Package maintainers: this should be a starting point
|
||||
# for your tor.service; it is not the last point.
|
||||
|
||||
[Unit]
|
||||
Description=Anonymizing overlay network for TCP
|
||||
After=syslog.target network.target nss-lookup.target
|
||||
|
||||
[Service]
|
||||
Type=notify
|
||||
NotifyAccess=all
|
||||
ExecStartPre=@BINDIR@/tor -f @CONFDIR@/torrc --verify-config
|
||||
ExecStart=@BINDIR@/tor -f @CONFDIR@/torrc
|
||||
ExecReload=/bin/kill -HUP ${MAINPID}
|
||||
KillSignal=SIGINT
|
||||
TimeoutSec=30
|
||||
Restart=on-failure
|
||||
WatchdogSec=1m
|
||||
LimitNOFILE=32768
|
||||
|
||||
# Hardening
|
||||
PrivateTmp=yes
|
||||
PrivateDevices=yes
|
||||
ProtectHome=yes
|
||||
ProtectSystem=full
|
||||
ReadOnlyDirectories=/
|
||||
ReadWriteDirectories=-@LOCALSTATEDIR@/lib/tor
|
||||
ReadWriteDirectories=-@LOCALSTATEDIR@/log/tor
|
||||
NoNewPrivileges=yes
|
||||
CapabilityBoundingSet=CAP_SETUID CAP_SETGID CAP_NET_BIND_SERVICE
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
|
@ -8,25 +8,23 @@
|
|||
exitlist -- Given a Tor directory on stdin, lists the Tor servers
|
||||
that accept connections to given addreses.
|
||||
|
||||
example usage:
|
||||
example usage (Tor 0.2.0.7-alpha and earlier):
|
||||
|
||||
cat ~/.tor/cached-routers* | python exitlist 18.244.0.188:80
|
||||
|
||||
example usage (Tor 0.2.0.8-alpha and later):
|
||||
|
||||
cat ~/.tor/cached-descriptors* | python exitlist 18.244.0.188:80
|
||||
|
||||
You should look at the "FetchUselessDescriptors" and "FetchDirInfoEarly"
|
||||
config options in the man page.
|
||||
You should look at the "FetchUselessDescriptors" config option in the
|
||||
man page. For 0.2.0.13-alpha and later, also look at the
|
||||
"FetchDirInfoEarly" config option.
|
||||
|
||||
Note that this script won't give you a perfect list of IP addresses
|
||||
that might connect to you using Tor.
|
||||
False negatives:
|
||||
- Some Tor servers might exit from other addresses than the one they
|
||||
publish in their descriptor.
|
||||
False positives:
|
||||
- This script just looks at the descriptor lists, so it counts relays
|
||||
that were running a day in the past and aren't running now (or are
|
||||
now running at a different address).
|
||||
|
||||
See https://check.torproject.org/ for an alternative (more accurate!)
|
||||
approach.
|
||||
that might connect to you using Tor, since some Tor servers might exit
|
||||
from other addresses than the one they publish. See
|
||||
https://check.torproject.org/ for an alternative (more
|
||||
accurate!) approach.
|
||||
|
||||
"""
|
||||
|
|
@ -0,0 +1,78 @@
|
|||
/* Copyright 2006 Nick Mathewson; see LICENSE for licensing information */
|
||||
/* $Id$ */
|
||||
|
||||
/* id_to_fp.c : Helper for directory authority ops. When somebody sends us
|
||||
* a private key, this utility converts the private key into a fingerprint
|
||||
* so you can de-list that fingerprint.
|
||||
*/
|
||||
|
||||
#include <openssl/rsa.h>
|
||||
#include <openssl/bio.h>
|
||||
#include <openssl/sha.h>
|
||||
#include <openssl/pem.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#define die(s) do { fprintf(stderr, "%s\n", s); goto err; } while (0)
|
||||
|
||||
int
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
BIO *b = NULL;
|
||||
RSA *key = NULL;
|
||||
unsigned char *buf = NULL, *bufp;
|
||||
int len, i;
|
||||
unsigned char digest[20];
|
||||
int status = 1;
|
||||
|
||||
if (argc < 2) {
|
||||
fprintf(stderr, "Reading key from stdin...\n");
|
||||
if (!(b = BIO_new_fp(stdin, BIO_NOCLOSE)))
|
||||
die("couldn't read from stdin");
|
||||
} else if (argc == 2) {
|
||||
if (strcmp(argv[1], "-h") == 0 ||
|
||||
strcmp(argv[1], "--help") == 0) {
|
||||
fprintf(stdout, "Usage: %s [keyfile]\n", argv[0]);
|
||||
status = 0;
|
||||
goto err;
|
||||
} else {
|
||||
if (!(b = BIO_new_file(argv[1], "r")))
|
||||
die("couldn't open file");
|
||||
}
|
||||
} else {
|
||||
fprintf(stderr, "Usage: %s [keyfile]\n", argv[0]);
|
||||
goto err;
|
||||
}
|
||||
if (!(key = PEM_read_bio_RSAPrivateKey(b, NULL, NULL, NULL)))
|
||||
die("couldn't parse key");
|
||||
|
||||
len = i2d_RSAPublicKey(key, NULL);
|
||||
if (len < 0)
|
||||
die("Bizarre key");
|
||||
bufp = buf = malloc(len+1);
|
||||
if (!buf)
|
||||
die("Out of memory");
|
||||
len = i2d_RSAPublicKey(key, &bufp);
|
||||
if (len < 0)
|
||||
die("Bizarre key");
|
||||
|
||||
SHA1(buf, len, digest);
|
||||
for (i=0; i < 20; i += 2) {
|
||||
printf("%02X%02X ", (int)digest[i], (int)digest[i+1]);
|
||||
}
|
||||
printf("\n");
|
||||
|
||||
status = 0;
|
||||
|
||||
err:
|
||||
if (buf)
|
||||
free(buf);
|
||||
if (key)
|
||||
RSA_free(key);
|
||||
if (b)
|
||||
BIO_free(b);
|
||||
return status;
|
||||
}
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
|
||||
EXTRA_DIST+= \
|
||||
contrib/README \
|
||||
contrib/client-tools/torify \
|
||||
contrib/dist/rc.subr \
|
||||
contrib/dist/suse/tor.sh.in \
|
||||
contrib/dist/tor.sh \
|
||||
contrib/dist/torctl \
|
||||
contrib/dist/tor.service.in \
|
||||
contrib/operator-tools/linux-tor-prio.sh \
|
||||
contrib/operator-tools/tor-exit-notice.html \
|
||||
contrib/or-tools/exitlist \
|
||||
contrib/win32build/package_nsis-mingw.sh \
|
||||
contrib/win32build/tor-mingw.nsi.in \
|
||||
contrib/win32build/tor.ico \
|
||||
contrib/win32build/tor.nsi.in
|
||||
|
||||
bin_SCRIPTS+= contrib/client-tools/torify
|
|
@ -87,7 +87,7 @@ RATE_UP=5000
|
|||
# machine does any other network activity. That is not very fun.
|
||||
RATE_UP_TOR=1500
|
||||
|
||||
# RATE_UP_TOR_CEIL is the maximum rate allowed for all Tor traffic in
|
||||
# RATE_UP_TOR_CEIL is the maximum rate allowed for all Tor trafic in
|
||||
# kbits/sec.
|
||||
RATE_UP_TOR_CEIL=5000
|
||||
|
|
@ -0,0 +1,169 @@
|
|||
#!/usr/bin/env python2.3
|
||||
|
||||
import re, sys
|
||||
import textwrap
|
||||
|
||||
files = sys.argv[1:]
|
||||
funcDeclaredIn = {}
|
||||
fileDeclares = {}
|
||||
functionCalls = {}
|
||||
funcCalledByFile = {}
|
||||
funcCalledByFunc = {}
|
||||
|
||||
cpp_re = re.compile(r'//.*$')
|
||||
c_re = re.compile(r'/[*]+(?:[^*]+|[*]+[^/*])*[*]+/', re.M|re.S)
|
||||
|
||||
for fname in files:
|
||||
f = open(fname, 'r')
|
||||
curFunc = "???"
|
||||
functionCalls.setdefault(curFunc,{})
|
||||
lineno = 0
|
||||
body = f.read()
|
||||
body = cpp_re.sub(" ",body)
|
||||
body = c_re.sub(" ",body)
|
||||
#if fname == 'dns.c': print body
|
||||
for line in body.split("\n"):
|
||||
lineno += 1
|
||||
m = re.match(r'^[^\s/].*\s(\w+)\([^;]*$', line)
|
||||
if m:
|
||||
#print line, "->", m.group(1)
|
||||
curFunc = m.group(1)
|
||||
if curFunc[0] == '_': curFunc = curFunc[1:]
|
||||
functionCalls.setdefault(curFunc,{})
|
||||
funcDeclaredIn[m.group(1)] = fname
|
||||
fileDeclares.setdefault(fname, {})[m.group(1)] = 1
|
||||
continue
|
||||
m = re.match(r'^(\w+)\([^;]', line)
|
||||
if m:
|
||||
#print line, "->", m.group(1)
|
||||
curFunc = m.group(1)
|
||||
if curFunc[0] == '_': curFunc = curFunc[1:]
|
||||
functionCalls.setdefault(curFunc,{})
|
||||
funcDeclaredIn[m.group(1)] = fname
|
||||
fileDeclares.setdefault(fname, {})[m.group(1)] = 1
|
||||
continue
|
||||
while line:
|
||||
m = re.search(r'(\w+)\(', line)
|
||||
if not m: break
|
||||
#print fname, line, curFunc, "->", m.group(1)
|
||||
fn = m.group(1)
|
||||
if fn[0] == '_':
|
||||
fn = fn[1:]
|
||||
functionCalls[curFunc][m.group(1)] = 1
|
||||
#if curFunc == "???":
|
||||
# print ">>!!!!! at %s:%s"%(fname,lineno)
|
||||
funcCalledByFunc.setdefault(m.group(1), {})[curFunc]=1
|
||||
funcCalledByFile.setdefault(m.group(1), {})[fname]=1
|
||||
line = line[m.end():]
|
||||
|
||||
f.close()
|
||||
|
||||
fileUsers = {}
|
||||
fileUses = {}
|
||||
|
||||
for fname in files:
|
||||
print "%s:"%fname
|
||||
users = {}
|
||||
for func in fileDeclares[fname]:
|
||||
cb = funcCalledByFile.get(func,{}).keys()
|
||||
for f in cb: users[f] = 1
|
||||
#print "users[%s] = %s"%(f,users[f])
|
||||
users = users.keys()
|
||||
users.sort()
|
||||
fileUsers[fname] = users
|
||||
for user in users:
|
||||
fileUses.setdefault(user,[]).append(fname)
|
||||
if user == fname: continue
|
||||
print " from %s:"%user
|
||||
for func in fileDeclares[fname]:
|
||||
if funcCalledByFile.get(func,{}).get(user,0):
|
||||
print " %s()"%func
|
||||
|
||||
def wrap(s, pre):
|
||||
return textwrap.fill(s,
|
||||
width=77, initial_indent=pre,
|
||||
subsequent_indent=" "*len(pre))
|
||||
|
||||
for fname in files:
|
||||
print
|
||||
print "===== %s"%fname
|
||||
print wrap(" ".join(fileUses[fname]),
|
||||
" Calls: ")
|
||||
print wrap(" ".join(fileUsers[fname]),
|
||||
" Called by: ")
|
||||
|
||||
print "=============================="
|
||||
|
||||
funcnames = functionCalls.keys()
|
||||
funcnames.sort()
|
||||
|
||||
if 1:
|
||||
for func in funcnames:
|
||||
print "===== %s"%func
|
||||
callers = [c for c in funcCalledByFunc.get(func,{}).keys()
|
||||
if c != "???"]
|
||||
callers.sort()
|
||||
called = [c for c in functionCalls[func].keys() if c != "???" and
|
||||
c in funcnames]
|
||||
called.sort()
|
||||
print wrap(" ".join(callers),
|
||||
" Called by:")
|
||||
print wrap(" ".join(called),
|
||||
" Calls:")
|
||||
|
||||
# simple topological sort.
|
||||
functionDepth = {}
|
||||
while 1:
|
||||
BIG = 1000000
|
||||
any = 0
|
||||
for func in funcnames:
|
||||
if functionDepth.has_key(func):
|
||||
continue
|
||||
called = [c for c in functionCalls[func] if c != func and
|
||||
functionCalls.has_key(c)]
|
||||
if len(called) == 0:
|
||||
functionDepth[func] = 0
|
||||
#print "Depth(%s)=%s"%(func,0)
|
||||
any = 1
|
||||
continue
|
||||
calledDepths = [ functionDepth.get(c,BIG) for c in called ]
|
||||
if max(calledDepths) < BIG:
|
||||
d = functionDepth[func] = max(calledDepths)+1
|
||||
#print "Depth(%s)=%s"%(func,d)
|
||||
any = 1
|
||||
continue
|
||||
if not any:
|
||||
break
|
||||
|
||||
# compute lexical closure.
|
||||
cycCalls = {}
|
||||
for func in funcnames:
|
||||
if not functionDepth.has_key(func):
|
||||
calls = [ c for c in functionCalls[func] if c != func and
|
||||
functionCalls.has_key(c) and not functionDepth.has_key(c)]
|
||||
cycCalls[func] = d = {}
|
||||
for c in calls:
|
||||
d[c]=1
|
||||
|
||||
cycNames = cycCalls.keys()
|
||||
while 1:
|
||||
any = 0
|
||||
for func in cycNames:
|
||||
L = len(cycCalls[func])
|
||||
for called in cycCalls[func].keys():
|
||||
cycCalls[func].update(cycCalls[called])
|
||||
if L != len(cycCalls[func]):
|
||||
any = 1
|
||||
if not any:
|
||||
break
|
||||
|
||||
depthList = [ (v,k) for k,v in functionDepth.items() ]
|
||||
depthList.sort()
|
||||
cycList = [ (len(v),k) for k,v in cycCalls.items() ]
|
||||
cycList.sort()
|
||||
for depth,name in depthList:
|
||||
print "Depth[%s]=%s"%(name,depth)
|
||||
for bredth,name in cycList:
|
||||
print "Width[%s]=%s"%(name,bredth)
|
||||
|
||||
print "Sorted %s / %s"%(len(functionDepth),len(funcnames))
|
|
@ -8,6 +8,8 @@
|
|||
# Usage: nagios-check-tor-authority-cert <authority identity fingerprint>
|
||||
# e.g.: nagios-check-tor-authority-cert A9AC67E64B200BBF2FA26DF194AC0469E2A948C6
|
||||
|
||||
# $Id$
|
||||
|
||||
# Copyright (c) 2008 Peter Palfrader <peter@palfrader.org>
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining
|
|
@ -0,0 +1,74 @@
|
|||
!include "MUI.nsh"
|
||||
!include "LogicLib.nsh"
|
||||
!include "FileFunc.nsh"
|
||||
|
||||
!define VERSION "0.2.1.13"
|
||||
!define INSTALLER "TorNetInstaller.exe"
|
||||
!define WEBSITE "https://www.torproject.org/"
|
||||
!define LICENSE "LICENSE"
|
||||
|
||||
SetCompressor /SOLID BZIP2
|
||||
RequestExecutionLevel user
|
||||
OutFile ${INSTALLER}
|
||||
InstallDir "$TEMP\TorInstTmp"
|
||||
SetOverWrite on
|
||||
Name "Tor Network Installer"
|
||||
Caption "Tor Network Installer"
|
||||
BrandingText "Tor Network Installer"
|
||||
CRCCheck on
|
||||
XPStyle on
|
||||
ShowInstDetails hide
|
||||
VIProductVersion "${VERSION}"
|
||||
VIAddVersionKey "ProductName" "Tor"
|
||||
VIAddVersionKey "Comments" "${WEBSITE}"
|
||||
VIAddVersionKey "LegalTrademarks" "Three line BSD"
|
||||
VIAddVersionKey "LegalCopyright" "©2004-2011, Roger Dingledine, Nick Mathewson, The Tor Project, Inc."
|
||||
VIAddVersionKey "FileDescription" "Tor is an implementation of Onion Routing. You can read more at ${WEBSITE}"
|
||||
VIAddVersionKey "FileVersion" "${VERSION}"
|
||||
|
||||
!define MUI_ICON "torinst32.ico"
|
||||
!define MUI_HEADERIMAGE_BITMAP "${NSISDIR}\Contrib\Graphics\Header\win.bmp"
|
||||
!insertmacro MUI_PAGE_INSTFILES
|
||||
!insertmacro MUI_LANGUAGE "English"
|
||||
|
||||
Section "Tor" Tor
|
||||
SectionIn RO
|
||||
SetOutPath $INSTDIR
|
||||
Call ExtractPackages
|
||||
Call RunInstallers
|
||||
Call LaunchVidalia
|
||||
Call CleanUpTemp
|
||||
SectionEnd
|
||||
|
||||
Function ExtractPackages
|
||||
File "license.msi"
|
||||
File "thandy.msi"
|
||||
FunctionEnd
|
||||
|
||||
Function RunInstallers
|
||||
ExecWait 'msiexec /i "$INSTDIR\license.msi" /qn'
|
||||
ExecWait 'msiexec /i "$INSTDIR\thandy.msi" NOSC=1 /qn'
|
||||
ExecWait '"$LOCALAPPDATA\Programs\Thandy\thandy.exe" update "--repo=$LOCALAPPDATA\Thandy\Tor Updates" /bundleinfo/tor/win32/'
|
||||
ExecWait '"$LOCALAPPDATA\Programs\Thandy\thandy.exe" update "--repo=$LOCALAPPDATA\Thandy\Polipo Updates" /bundleinfo/polipo/win32/'
|
||||
ExecWait '"$LOCALAPPDATA\Programs\Thandy\thandy.exe" update "--repo=$LOCALAPPDATA\Thandy\TorButton Updates" /bundleinfo/torbutton/win32/'
|
||||
ExecWait '"$LOCALAPPDATA\Programs\Thandy\thandy.exe" update "--repo=$LOCALAPPDATA\Thandy\Vidalia Updates" /bundleinfo/vidalia/win32/'
|
||||
ExecWait '"$LOCALAPPDATA\Programs\Thandy\thandy.exe" update --install "--repo=$LOCALAPPDATA\Thandy\Tor Updates" /bundleinfo/tor/win32/'
|
||||
ExecWait '"$LOCALAPPDATA\Programs\Thandy\thandy.exe" update --install "--repo=$LOCALAPPDATA\Thandy\Polipo Updates" /bundleinfo/polipo/win32/'
|
||||
ExecWait '"$LOCALAPPDATA\Programs\Thandy\thandy.exe" update --install "--repo=$LOCALAPPDATA\Thandy\TorButton Updates" /bundleinfo/torbutton/win32/'
|
||||
ExecWait '"$LOCALAPPDATA\Programs\Thandy\thandy.exe" update --install "--repo=$LOCALAPPDATA\Thandy\Vidalia Updates" /bundleinfo/vidalia/win32/'
|
||||
ExpandEnvStrings $0 %COMSPEC%
|
||||
Exec '"$0" /C "$INSTDIR\tbcheck.bat"'
|
||||
FunctionEnd
|
||||
|
||||
Function LaunchVidalia
|
||||
SetOutPath "$LOCALAPPDATA\Programs\Vidalia"
|
||||
Exec 'vidalia.exe -loglevel info -logfile log.txt'
|
||||
FunctionEnd
|
||||
|
||||
Function CleanUpTemp
|
||||
ExecWait '"del" "$INSTDIR\license.msi"'
|
||||
ExecWait '"del" "$INSTDIR\thandy.msi"'
|
||||
SetOutPath $TEMP
|
||||
RMDir /r $TEMP\TorInstTmp
|
||||
FunctionEnd
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
# XXX Is this define necessary, or is it redundant with the
|
||||
# one from the top-level configure? -RD
|
||||
confdir = $(sysconfdir)/Tor
|
||||
|
||||
EXTRA_DIST = ReadMe.rtf StartupParameters.plist Tor TorBundleDesc.plist.in \
|
||||
TorBundleInfo.plist.in TorBundleWelcome.rtf TorDesc.plist.in \
|
||||
TorInfo.plist.in TorStartupDesc.plist.in TorStartupInfo.plist \
|
||||
package.sh TorPostflight addsysuser Tor_Uninstaller.applescript \
|
||||
uninstall_tor_bundle.sh package_list.txt tor_logo.gif TorPreFlight
|
|
@ -0,0 +1,7 @@
|
|||
{\rtf1\mac\ansicpg10000\cocoartf102
|
||||
{\fonttbl\f0\fswiss\fcharset77 Helvetica;}
|
||||
{\colortbl;\red255\green255\blue255;}
|
||||
\margl1440\margr1440\vieww9000\viewh9000\viewkind0
|
||||
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural
|
||||
|
||||
\f0\fs24 \cf0 Tor is a toolset for a wide range of organizations and people who want to improve their safety and security on the Internet. Using Tor can help you anonymize web browsing and publishing, instant messaging, IRC, SSH, and more. Tor also provides a platform on which software developers can build new applications with built-in anonymity, safety, and privacy features.}
|
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
Description = "Tor";
|
||||
Provides = ("tor");
|
||||
Requires = ("Network");
|
||||
Uses = ("Network");
|
||||
OrderPreference = "Last";
|
||||
Messages =
|
||||
{
|
||||
start = "Starting Tor";
|
||||
stop = "Stopping Tor";
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,87 @@
|
|||
#!/bin/sh
|
||||
|
||||
TORLOC=/Library/StartupItems/Tor/Tor.loc
|
||||
|
||||
if [ -f $TORLOC ]; then
|
||||
TORDIR=`cat /Library/StartupItems/Tor/Tor.loc`
|
||||
if [ "x$TORDIR" = "x" -o ! -d $TORDIR -o ! -x $TORDIR/tor ]; then
|
||||
TORDIR=/Library/Tor
|
||||
fi
|
||||
else
|
||||
TORDIR=/Library/Tor
|
||||
fi
|
||||
TORCONF=$TORDIR/torrc
|
||||
TORDATA=$TORDIR/var/lib/tor
|
||||
TORPID=/var/run/Tor.pid
|
||||
TORUSER=_tor
|
||||
TORGROUP=daemon
|
||||
TORCMD=$TORDIR/tor
|
||||
TORLOG=/var/log/tor.log
|
||||
|
||||
## Determine OSX Version
|
||||
# map version to name
|
||||
if [ -x /usr/bin/sw_vers ]; then
|
||||
# This is poor, yet functional. We don't care about the 3rd number in
|
||||
# the OS version
|
||||
OSVER=`/usr/bin/sw_vers | grep ProductVersion | cut -f2 | cut -d"." -f1,2`
|
||||
case "$OSVER" in
|
||||
"10.6") ARCH="universal";;
|
||||
"10.5") ARCH="universal";;
|
||||
"10.4") ARCH="universal";;
|
||||
"10.3") ARCH="ppc";;
|
||||
"10.2") ARCH="ppc";;
|
||||
"10.1") ARCH="ppc";;
|
||||
"10.0") ARCH="ppc";;
|
||||
esac
|
||||
else
|
||||
ARCH="unknown"
|
||||
fi
|
||||
|
||||
if [ $ARCH != "universal" ]; then
|
||||
export EVENT_NOKQUEUE=1
|
||||
fi
|
||||
|
||||
##
|
||||
# Tor Service
|
||||
##
|
||||
|
||||
. /etc/rc.common
|
||||
|
||||
StartService ()
|
||||
{
|
||||
|
||||
if [ -f $TORCMD ]; then
|
||||
if pid=$(GetPID Tor); then
|
||||
return 0
|
||||
else
|
||||
ConsoleMessage "Starting Tor Service"
|
||||
# Tentative
|
||||
# Making sure it is not running (I know it is not a best approarch)
|
||||
killall tor 2>/dev/null
|
||||
$TORCMD -f "$TORCONF" --runasdaemon 1 --pidfile "$TORPID" --datadirectory "$TORDATA" --user "$TORUSER" --group "$TORGROUP" --log "notice file $TORLOG" &
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
StopService ()
|
||||
{
|
||||
if pid=$(GetPID Tor); then
|
||||
ConsoleMessage "Stopping Tor Service"
|
||||
kill -TERM "${pid}"
|
||||
# Just for sanity (sometimes necessary.)
|
||||
killall tor 2>/dev/null
|
||||
else
|
||||
ConsoleMessage "Tor Service not responding."
|
||||
# Just for sanity (sometimes necessary.)
|
||||
killall tor 2>/dev/null
|
||||
fi
|
||||
}
|
||||
|
||||
RestartService () { StopService; StartService; }
|
||||
|
||||
if [ "$#" = 0 ]; then
|
||||
echo "Syntax: tor {start|stop}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
RunService "$1"
|
|
@ -0,0 +1,14 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>IFPkgDescriptionDeleteWarning</key>
|
||||
<string></string>
|
||||
<key>IFPkgDescriptionDescription</key>
|
||||
<string>Bundled package of Tor @VERSION@.</string>
|
||||
<key>IFPkgDescriptionTitle</key>
|
||||
<string>Tor Expert Bundle</string>
|
||||
<key>IFPkgDescriptionVersion</key>
|
||||
<string>@VERSION@</string>
|
||||
</dict>
|
||||
</plist>
|
|
@ -0,0 +1,33 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleName</key>
|
||||
<string>Tor Bundle</string>
|
||||
<key>CFBundleGetInfoString</key>
|
||||
<string>Tor Bundle @VERSION@</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>org.torproject.torbundle</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>@VERSION@</string>
|
||||
<key>IFPkgFlagComponentDirectory</key>
|
||||
<string>../.contained_packages</string>
|
||||
<key>IFPkgFlagPackageList</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>IFPkgFlagPackageLocation</key>
|
||||
<string>Tor.pkg</string>
|
||||
<key>IFPkgFlagPackageSelection</key>
|
||||
<string>required</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>IFPkgFlagPackageLocation</key>
|
||||
<string>torstartup.pkg</string>
|
||||
<key>IFPkgFlagPackageSelection</key>
|
||||
<string>selected</string>
|
||||
</dict>
|
||||
</array>
|
||||
<key>IFPkgFormatVersion</key>
|
||||
<real>0.10000000149011612</real>
|
||||
</dict>
|
||||
</plist>
|
|
@ -0,0 +1,20 @@
|
|||
{\rtf1\mac\ansicpg10000\cocoartf824\cocoasubrtf420
|
||||
{\fonttbl\f0\fswiss\fcharset77 Helvetica;\f1\fswiss\fcharset77 Helvetica-Oblique;\f2\fswiss\fcharset77 Helvetica-Bold;
|
||||
}
|
||||
{\colortbl;\red255\green255\blue255;}
|
||||
\paperw11900\paperh16840\margl1440\margr1440\vieww9000\viewh9000\viewkind0
|
||||
\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural
|
||||
|
||||
\f0\fs24 \cf0 Welcome to the Tor Expert installer.\
|
||||
This will install Tor in your computer.\
|
||||
\
|
||||
|
||||
\f0\b0 \
|
||||
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural
|
||||
|
||||
\f2\b \cf0 Tor
|
||||
\f0\b0 is a system for using the Internet anonymously, and allowing\
|
||||
others to do so.\
|
||||
\
|
||||
For more information, please visit https://www.torproject.org/\
|
||||
\
|
|
@ -0,0 +1,10 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>IFPkgDescriptionTitle</key>
|
||||
<string>Tor</string>
|
||||
<key>IFPkgDescriptionVersion</key>
|
||||
<string>@VERSION@</string>
|
||||
</dict>
|
||||
</plist>
|
|
@ -0,0 +1,28 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>Tor @VERSION@</string>
|
||||
<key>CFBundleGetInfoString</key>
|
||||
<string>Tor @VERSION@</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>Tor</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>@VERSION@</string>
|
||||
<key>IFPkgFlagAllowBackRev</key>
|
||||
<true/>
|
||||
<key>IFPkgFlagAuthorizationAction</key>
|
||||
<string>RootAuthorization</string>
|
||||
<key>IFPkgFlagFollowLinks</key>
|
||||
<true/>
|
||||
<key>IFPkgFlagIsRequired</key>
|
||||
<true/>
|
||||
<key>IFPkgFlagRootVolumeOnly</key>
|
||||
<true/>
|
||||
<key>IfPkgFlagBackgroundScaling</key>
|
||||
<string>proportional</string>
|
||||
<key>IFPkgFlagBackgroundAlignment</key>
|
||||
<string>bottomleft</string>
|
||||
</dict>
|
||||
</plist>
|
|
@ -0,0 +1,123 @@
|
|||
#!/bin/sh
|
||||
# ====================================================================
|
||||
# TorPostFlight is distributed under this license
|
||||
#
|
||||
# Copyright (c) 2006 Andrew Lewman
|
||||
# Copyright (c) 2008 The Tor Project
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are
|
||||
# met:
|
||||
#
|
||||
# * Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
#
|
||||
# * Redistributions in binary form must reproduce the above
|
||||
# copyright notice, this list of conditions and the following disclaimer
|
||||
# in the documentation and/or other materials provided with the
|
||||
# distribution.
|
||||
#
|
||||
# * Neither the names of the copyright owners nor the names of its
|
||||
# contributors may be used to endorse or promote products derived from
|
||||
# this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
# ======================================================================
|
||||
|
||||
# TorPostflight gets invoked after any install or upgrade.
|
||||
|
||||
ADDSYSUSER=$RECEIPT_PATH/addsysuser
|
||||
if [ ! -x "$ADDSYSUSER" ]; then
|
||||
echo "Could not find addsysuser script."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
TORUSER=_tor
|
||||
TORGROUP=daemon
|
||||
TARGET=$2/Library/Tor
|
||||
TORDIR=$TARGET/var/lib/tor
|
||||
LOGFILE=/var/log/tor.log
|
||||
|
||||
# Check defaults for TARGET
|
||||
if [ "$TARGET" == "//Library/Tor" ]; then
|
||||
TARGET=/Library/Tor
|
||||
fi
|
||||
|
||||
# Create user $TORUSER in group daemon. If it's already there, great.
|
||||
$ADDSYSUSER $TORUSER "Tor System user" $TORDIR
|
||||
|
||||
# Create the tor directory, if it doesn't exist.
|
||||
if [ ! -d $TORDIR ]; then
|
||||
mkdir -p $TORDIR
|
||||
fi
|
||||
# Check its permissions.
|
||||
chown $TORUSER $TORDIR
|
||||
chgrp daemon $TORDIR
|
||||
chmod 700 $TORDIR
|
||||
|
||||
if [ ! -f $LOGFILE ]; then
|
||||
touch $LOGFILE
|
||||
chown $TORUSER $LOGFILE
|
||||
chgrp daemon $LOGFILE
|
||||
chmod 660 $LOGFILE
|
||||
fi
|
||||
|
||||
# Create the configuration file only if there wasn't one already.
|
||||
if [ ! -f $TARGET/torrc ]; then
|
||||
cp $TARGET/torrc.sample $TARGET/torrc
|
||||
fi
|
||||
|
||||
# Put the geoip database into the datadir
|
||||
if [ ! -f $TORDIR/geoip ]; then
|
||||
cp $PACKAGE_PATH/Contents/Resources/geoip $TORDIR/geoip
|
||||
fi
|
||||
|
||||
# Ensure symbolic links
|
||||
cd /usr/bin
|
||||
if [ -e /usr/bin/tor -a ! -L /usr/bin/tor ]; then
|
||||
mv tor tor_old
|
||||
fi
|
||||
if [ -e /usr/bin/tor-resolve -a ! -L /usr/bin/tor-resolve ]; then
|
||||
mv tor-resolve tor-resolve_old
|
||||
fi
|
||||
ln -sf $TARGET/tor .
|
||||
ln -sf $TARGET/tor-resolve .
|
||||
|
||||
cd /usr/share/man/man1
|
||||
MAN1=$TARGET/share/man/man1
|
||||
#ln -sf $MAN1/*.1 .
|
||||
|
||||
# Copy Documentation
|
||||
if [ -d $PACKAGE_PATH/Contents/Resources/documents ];then
|
||||
cp -r $PACKAGE_PATH/Contents/Resources/documents $TARGET/documents
|
||||
fi
|
||||
|
||||
# Copy Uninstaller
|
||||
if [ -f $PACKAGE_PATH/Contents/Resources/Tor_Uninstaller.applescript ]; then
|
||||
cp $PACKAGE_PATH/Contents/Resources/Tor_Uninstaller.applescript $TARGET/Tor_Uninstaller.applescript
|
||||
chmod 550 $TARGET/Tor_Uninstaller.applescript
|
||||
fi
|
||||
|
||||
if [ -f $PACKAGE_PATH/Contents/Resources/uninstall_tor_bundle.sh ]; then
|
||||
cp $PACKAGE_PATH/Contents/Resources/uninstall_tor_bundle.sh $TARGET/uninstall_tor_bundle.sh
|
||||
chmod 550 $TARGET/uninstall_tor_bundle.sh
|
||||
fi
|
||||
|
||||
if [ -f $PACKAGE_PATH/Contents/Resources/package_list.txt ]; then
|
||||
cp $PACKAGE_PATH/Contents/Resources/package_list.txt $TARGET/package_list.txt
|
||||
fi
|
||||
|
||||
if [ -d /Library/StartupItems/Tor ]; then
|
||||
rm -f /Library/StartupItems/Tor/Tor.loc
|
||||
echo "$TARGET" > /Library/StartupItems/Tor/Tor.loc
|
||||
fi
|
|
@ -0,0 +1,51 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# ===================================================================
|
||||
#
|
||||
# TorPreFlight is distributed under this license:
|
||||
#
|
||||
# Copyright (c) 2006 Andrew Lewman
|
||||
# Copyright (c) 2008 The Tor Project, Inc.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are
|
||||
# met:
|
||||
#
|
||||
# * Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
#
|
||||
# * Redistributions in binary form must reproduce the above
|
||||
# copyright notice, this list of conditions and the following disclaimer
|
||||
# in the documentation and/or other materials provided with the
|
||||
# distribution.
|
||||
#
|
||||
# * Neither the names of the copyright owners nor the names of its
|
||||
# contributors may be used to endorse or promote products derived from
|
||||
# this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#===============================================================================
|
||||
|
||||
# TorPreFlight is invoked before the install begins
|
||||
|
||||
# Figure out where Tor is installed
|
||||
if [ -f /Library/StartupItems/Tor/Tor.loc ]; then
|
||||
TORPATH=`cat /Library/StartupItems/Tor/Tor.loc`
|
||||
else
|
||||
TORPATH="/Library/Tor/"
|
||||
fi
|
||||
|
||||
# Backup all of Tor, just in case
|
||||
if [ -d $TORPATH ]; then
|
||||
cp $TORPATH/torrc $TORPATH/torrc.installer-saved
|
||||
fi
|
|
@ -0,0 +1,10 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>IFPkgDescriptionTitle</key>
|
||||
<string>Tor Startup Script</string>
|
||||
<key>IFPkgDescriptionVersion</key>
|
||||
<string>@VERSION@</string>
|
||||
</dict>
|
||||
</plist>
|
|
@ -0,0 +1,26 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>Tor Startup Script</string>
|
||||
<key>CFBundleGetInfoString</key>
|
||||
<string>Tor Startup Script</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>Tor Startup Script</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>0.1</string>
|
||||
<key>IFPkgFlagAllowBackRev</key>
|
||||
<true/>
|
||||
<key>IFPkgFlagAuthorizationAction</key>
|
||||
<string>RootAuthorization</string>
|
||||
<key>IFPkgFlagRestartAction</key>
|
||||
<string>NoRestart</string>
|
||||
<key>IFPkgFlagFollowLinks</key>
|
||||
<true/>
|
||||
<key>IFPkgFlagIsRequired</key>
|
||||
<false/>
|
||||
<key>IFPkgFlagRootVolumeOnly</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
|
@ -0,0 +1,68 @@
|
|||
-- Tor Uninstaller.applescript
|
||||
-- Tor Uninstaller
|
||||
|
||||
-- ===============================================================================
|
||||
-- Tor Uninstaller is distributed under this license:
|
||||
--
|
||||
-- Copyright (c) 2005 Andrew Lewman ( pgp key: 31B0974B )
|
||||
--
|
||||
-- Redistribution and use in source and binary forms, with or without
|
||||
-- modification, are permitted provided that the following conditions are
|
||||
-- met:
|
||||
--
|
||||
-- * Redistributions of source code must retain the above copyright
|
||||
-- notice, this list of conditions and the following disclaimer.
|
||||
--
|
||||
-- * Redistributions in binary form must reproduce the above
|
||||
-- copyright notice, this list of conditions and the following disclaimer
|
||||
-- in the documentation and/or other materials provided with the
|
||||
-- distribution.
|
||||
--
|
||||
-- * Neither the names of the copyright owners nor the names of its
|
||||
-- contributors may be used to endorse or promote products derived from
|
||||
-- this software without specific prior written permission.
|
||||
--
|
||||
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
-- OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
-- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
-- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
-- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
-- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
-- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
-- ===============================================================================
|
||||
|
||||
on run
|
||||
|
||||
-- Validate & find disk paths
|
||||
set boot_disk to (path to startup disk) as string
|
||||
set default_tor_path to boot_disk & "Library:Tor"
|
||||
set default_privoxy_path to boot_disk & "Library:Privoxy"
|
||||
set default_tor_startup_path to boot_disk & "Library:StartupItems:Tor"
|
||||
set default_privoxy_startup_path to boot_disk & "Library:StartupItems:Privoxy"
|
||||
set shell_script to default_tor_path & ":uninstall_tor_bundle.sh"
|
||||
set doomed_path_list to {default_tor_path, default_privoxy_path, default_tor_startup_path, default_privoxy_startup_path}
|
||||
|
||||
-- Display what we're removing and ask for validation
|
||||
-- this is the simplest way to do this
|
||||
set remove_me to display dialog "Welcome to the Tor + Privoxy Uninstaller. This program will remove:" & return & return & POSIX path of default_tor_path & return & POSIX path of default_privoxy_path & return & POSIX path of default_tor_startup_path & return & POSIX path of default_privoxy_startup_path & return & return & "If this looks correct, choose Yes. Otherwise, choose No." buttons {"Yes", "No"} default button "No"
|
||||
|
||||
-- Run a shell script to do all the unix work since applescript can't see it at all
|
||||
if button returned of result is "Yes" then
|
||||
try
|
||||
do shell script (POSIX path of shell_script) with administrator privileges
|
||||
on error
|
||||
display dialog "Too many errors, quitting." buttons {"Quit"} default button "Quit" with icon stop giving up after 3
|
||||
quit
|
||||
end try
|
||||
-- So Long and Thanks for all the Fish!
|
||||
display dialog "Thank you for using tor!" buttons {"Ok"} giving up after 3
|
||||
else
|
||||
display dialog "Thank you for your continued use of Tor & Privoxy" buttons {"You're welcome."} giving up after 3
|
||||
end if
|
||||
|
||||
end run
|
||||
-- We're done
|
|
@ -0,0 +1,83 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# Original adduser 05 Feb 2002 by Jon L. Gardner
|
||||
#
|
||||
# Modified for Tor installer by Nick Mathewson
|
||||
# 2007-06-12 Modified for leopard by Andrew Lewman
|
||||
# Copyright (c) 2007 Andrew Lewman
|
||||
#
|
||||
|
||||
|
||||
ROOTPROP=/
|
||||
|
||||
if [ "`whoami`" != "root" ]; then
|
||||
echo "You must be root to execute this script."
|
||||
exit
|
||||
fi
|
||||
if [ "x$3" = "x" ]; then
|
||||
echo 'Usage: addsysuser <username> "<full name>" <homedir>'
|
||||
exit 0
|
||||
fi
|
||||
|
||||
username=$1
|
||||
realname=$2
|
||||
homedir=$3
|
||||
|
||||
if [ -x /usr/bin/dscl ]; then
|
||||
# Determine the gid of the daemon group
|
||||
gid=`dscl . -read /groups/daemon gid`
|
||||
if [ "x`dscl . -list /users|cut -f2 -d' '|grep $username`" != "x" ]; then
|
||||
echo The account $username already exists.
|
||||
exit 0
|
||||
fi
|
||||
if [ -x /usr/bin/nidump ]; then
|
||||
uiddef=`nidump passwd / | cut -d: -f3 | sort -n | grep -v '^[56789]..' |grep -v '^....$' | tail -n 1`
|
||||
else
|
||||
_tmp=/tmp/_dsexport_tmp.txt.$$
|
||||
rm -f $_tmp
|
||||
dsexport $_tmp '/Local/Default' 'dsRecTypeStandard:Users' > /dev/null 2>&1
|
||||
uiddef=`cat $_tmp | sed 's/\\\://g' | cut -d: -f6 | grep '^[0-9]' | sort -n | grep -v '^[56789]..' | grep -v '^....$' | tail -n 1`
|
||||
rm -f $_tmp
|
||||
fi
|
||||
uiddef=`echo $uiddef + 1 | bc`
|
||||
dscl . -create /users/$username uid $uiddef
|
||||
# home is the local path to the home directory
|
||||
home=/Users/$username
|
||||
echo Creating account for $username...
|
||||
dscl . -create /users/$username
|
||||
dscl . -create /users/$username _writers_tim_passwd $username
|
||||
dscl . -create /users/$username realname $realname
|
||||
dscl . -create /users/$username _writers_passwd $username
|
||||
dscl . -create /users/$username gid $gid
|
||||
dscl . -create /users/$username home $homedir
|
||||
dscl . -create /users/$username name $username
|
||||
dscl . -create /users/$username passwd '*'
|
||||
dscl . -create /users/$username shell /dev/null
|
||||
else
|
||||
# Determine the gid of the daemon group
|
||||
gid=`niutil -readprop $ROOTPROP /groups/daemon gid`
|
||||
if [ "x`niutil -list $ROOTPROP /users|cut -f2 -d' '|grep $username`" != "x" ]; then
|
||||
echo The account $username already exists.
|
||||
exit 0
|
||||
fi
|
||||
# home is the local path to the home directory
|
||||
home=/Users/$username
|
||||
# defhome is what goes into NetInfo
|
||||
defhome="/Network/Servers/MyServer/Users"
|
||||
#echo "Determining next available system uid (please be patient)..."
|
||||
# Uids over 500 are for system users.
|
||||
uiddef=`nidump passwd / | cut -d: -f3 | sort -n | grep -v '^[56789]..' |grep -v '^....$' | tail -n 1`
|
||||
uiddef=`echo $uiddef + 1 |bc`
|
||||
echo Creating account for $username...
|
||||
niutil -create $ROOTPROP /users/$username
|
||||
niutil -createprop $ROOTPROP /users/$username _writers_tim_passwd $username
|
||||
niutil -createprop $ROOTPROP /users/$username realname $realname
|
||||
niutil -createprop $ROOTPROP /users/$username _writers_passwd $username
|
||||
niutil -createprop $ROOTPROP /users/$username uid $uiddef
|
||||
#niutil -createprop $ROOTPROP /users/$username home_loc "<home_dir><url>afp://afp.server.com/Users/</url><path>$username</path></home_dir>"
|
||||
niutil -createprop $ROOTPROP /users/$username gid $gid
|
||||
niutil -createprop $ROOTPROP /users/$username home $homedir
|
||||
niutil -createprop $ROOTPROP /users/$username name $username
|
||||
niutil -createprop $ROOTPROP /users/$username passwd '*'
|
||||
niutil -createprop $ROOTPROP /users/$username shell /dev/null
|
||||
fi
|
|
@ -0,0 +1,26 @@
|
|||
<?xml version=\"1.0\" encoding=\"UTF-8\"?>
|
||||
<!DOCTYPE plist PUBLIC \"-//Apple Computer//DTD PLIST 1.0//EN\"
|
||||
\"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">
|
||||
<plist version=\"1.0\">
|
||||
<dict>
|
||||
<key>Label</key>
|
||||
<string>org.torproject.tor</string>
|
||||
<key>ProgramArguments</key>
|
||||
<array>
|
||||
<string>/usr/bin/tor</string>
|
||||
<string>-f</string>
|
||||
<string>/Library/Tor/torrc</string>
|
||||
</array>
|
||||
<key>RunAtLoad</key>
|
||||
<true/>
|
||||
<key>OnDemand</key>
|
||||
<false/>
|
||||
|
||||
<key>UserName</key>
|
||||
<string>_tor</string>
|
||||
<key>GroupName</key>
|
||||
<string>daemon</string>
|
||||
|
||||
</dict>
|
||||
|
||||
</plist>
|
|
@ -0,0 +1,155 @@
|
|||
#!/bin/sh
|
||||
# $Id$
|
||||
# Copyright 2004-2005 Nick Mathewson.
|
||||
# Copyright 2005-2007 Andrew Lewman
|
||||
# Copyright 2008 The Tor Project, Inc.
|
||||
# See LICENSE in Tor distribution for licensing information.
|
||||
|
||||
# This script builds a Macintosh OS X metapackage containing 2 packages:
|
||||
# - One for Tor.
|
||||
# - One for Startup script for Tor.
|
||||
#
|
||||
# This script expects to be run from the toplevel makefile, with VERSION
|
||||
# set to the latest Tor version, and Tor already built.
|
||||
#
|
||||
|
||||
# Read the documentation located in tor/doc/tor-osx-dmg-creation.txt on
|
||||
# how to build Tor for OSX
|
||||
|
||||
###
|
||||
# Helpful info on OS X packaging:
|
||||
# http://developer.apple.com/documentation/DeveloperTools/Conceptual/SoftwareDistribution/index.html
|
||||
# man packagemaker
|
||||
|
||||
# Make sure VERSION is set, so we don't name the package
|
||||
# "Tor--$ARCH-Bundle.dmg"
|
||||
if [ "XX$VERSION" = 'XX' ]; then
|
||||
echo "VERSION not set."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
## Determine OSX Version
|
||||
# map version to name
|
||||
if [ -x /usr/bin/sw_vers ]; then
|
||||
# This is poor, yet functional. We don't care about the 3rd number in
|
||||
# the OS version
|
||||
OSVER=`/usr/bin/sw_vers | grep ProductVersion | cut -f2 | cut -d"." -f1,2`
|
||||
case "$OSVER" in
|
||||
"10.6") ARCH="universal";;
|
||||
"10.5") ARCH="universal";;
|
||||
"10.4") ARCH="universal";;
|
||||
"10.3") ARCH="ppc";;
|
||||
"10.2") ARCH="ppc";;
|
||||
"10.1") ARCH="ppc";;
|
||||
"10.0") ARCH="ppc";;
|
||||
*) ARCH="unknown";;
|
||||
esac
|
||||
else
|
||||
ARCH="unknown"
|
||||
fi
|
||||
|
||||
# Where will we put our temporary files?
|
||||
BUILD_DIR=/tmp/tor-osx-$$
|
||||
# Path to PackageMaker app.
|
||||
PACKAGEMAKER=/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker
|
||||
|
||||
umask 022
|
||||
|
||||
echo I might ask you for your password now, so you can sudo.
|
||||
|
||||
sudo rm -rf $BUILD_DIR
|
||||
mkdir $BUILD_DIR || exit 1
|
||||
for subdir in tor_packageroot tor_resources \
|
||||
torstartup_packageroot \
|
||||
torbundle_resources \
|
||||
output; do
|
||||
mkdir $BUILD_DIR/$subdir
|
||||
done
|
||||
|
||||
### Make Tor package.
|
||||
|
||||
make install DESTDIR=$BUILD_DIR/tor_packageroot
|
||||
cp contrib/osx/ReadMe.rtf $BUILD_DIR/tor_resources
|
||||
chmod 755 contrib/osx/TorPostflight
|
||||
cp contrib/osx/TorPostflight $BUILD_DIR/tor_resources/postflight
|
||||
cp contrib/osx/addsysuser $BUILD_DIR/tor_resources/addsysuser
|
||||
cp contrib/osx/Tor_Uninstaller.applescript $BUILD_DIR/tor_resources/Tor_Uninstaller.applescript
|
||||
cp contrib/osx/uninstall_tor_bundle.sh $BUILD_DIR/tor_resources/uninstall_tor_bundle.sh
|
||||
cp contrib/osx/package_list.txt $BUILD_DIR/tor_resources/package_list.txt
|
||||
cp contrib/osx/tor_logo.gif $BUILD_DIR/tor_resources/background.gif
|
||||
cp src/config/geoip $BUILD_DIR/tor_resources/geoip
|
||||
cat <<EOF > $BUILD_DIR/tor_resources/Welcome.txt
|
||||
Tor: an anonymous Internet communication system
|
||||
|
||||
Tor is a system for using the internet anonymously, and allowing
|
||||
others to do so.
|
||||
EOF
|
||||
|
||||
### Assemble documentation
|
||||
|
||||
DOC=$BUILD_DIR/tor_resources/documents
|
||||
mkdir $DOC
|
||||
mkdir $DOC/howto
|
||||
cp AUTHORS $DOC/AUTHORS.txt
|
||||
groff doc/tor.1.in -T ps -m man | pstopdf -i -o $DOC/tor-reference.pdf
|
||||
groff doc/tor-resolve.1 -T ps -m man | pstopdf -i -o $DOC/tor-resolve.pdf
|
||||
mkdir $DOC/Advanced
|
||||
cp doc/spec/*.txt $DOC/Advanced
|
||||
cp doc/HACKING $DOC/Advanced/HACKING.txt
|
||||
cp ChangeLog $DOC/Advanced/ChangeLog.txt
|
||||
|
||||
find $BUILD_DIR/tor_packageroot -print0 |sudo xargs -0 chown root:wheel
|
||||
|
||||
$PACKAGEMAKER -build \
|
||||
-p $BUILD_DIR/output/Tor.pkg \
|
||||
-f $BUILD_DIR/tor_packageroot \
|
||||
-r $BUILD_DIR/tor_resources \
|
||||
-i contrib/osx/TorInfo.plist \
|
||||
-d contrib/osx/TorDesc.plist
|
||||
|
||||
### Make Startup Script package
|
||||
|
||||
mkdir -p $BUILD_DIR/torstartup_packageroot/Library/StartupItems/Tor
|
||||
cp contrib/osx/Tor contrib/osx/StartupParameters.plist \
|
||||
$BUILD_DIR/torstartup_packageroot/Library/StartupItems/Tor
|
||||
|
||||
find $BUILD_DIR/torstartup_packageroot -print0 | sudo xargs -0 chown root:wheel
|
||||
|
||||
$PACKAGEMAKER -build \
|
||||
-p $BUILD_DIR/output/torstartup.pkg \
|
||||
-f $BUILD_DIR/torstartup_packageroot \
|
||||
-i contrib/osx/TorStartupInfo.plist \
|
||||
-d contrib/osx/TorStartupDesc.plist
|
||||
|
||||
### Assemble the metapackage. Packagemaker won't buld metapackages from
|
||||
# the command line, so we need to do it by hand.
|
||||
|
||||
MPKG=$BUILD_DIR/output/Tor-$VERSION-$ARCH-Bundle.mpkg
|
||||
mkdir -p "$MPKG/Contents/Resources"
|
||||
echo -n "pmkrpkg1" > "$MPKG/Contents/PkgInfo"
|
||||
cp contrib/osx/ReadMe.rtf "$MPKG/Contents/Resources"
|
||||
cp contrib/osx/TorBundleInfo.plist "$MPKG/Contents/Info.plist"
|
||||
cp contrib/osx/TorBundleWelcome.rtf "$MPKG/Contents/Resources/Welcome.rtf"
|
||||
cp contrib/osx/TorBundleDesc.plist "$MPKG/Contents/Resources/Description.plist"
|
||||
cp contrib/osx/tor_logo.gif "$MPKG/Contents/Resources/background.gif"
|
||||
|
||||
# Move all the subpackages into place.
|
||||
mkdir $BUILD_DIR/output/.contained_packages
|
||||
mv $BUILD_DIR/output/*.pkg $BUILD_DIR/OUTPUT/.contained_packages
|
||||
( cd $BUILD_DIR/output/.contained_packages )
|
||||
|
||||
### Copy readmes and licenses into toplevel.
|
||||
cp contrib/osx/ReadMe.rtf $BUILD_DIR/output/Tor\ ReadMe.rtf
|
||||
cp LICENSE $BUILD_DIR/output/Tor\ License.txt
|
||||
|
||||
### Package it all into a DMG
|
||||
|
||||
find $BUILD_DIR/output -print0 | sudo xargs -0 chown root:wheel
|
||||
|
||||
mv $BUILD_DIR/output "$BUILD_DIR/Tor-$VERSION-$ARCH-Bundle"
|
||||
rm -f "Tor-$VERSION-$ARCH-Bundle.dmg"
|
||||
USER="`whoami`"
|
||||
sudo hdiutil create -format UDZO -imagekey zlib-level=9 -srcfolder "$BUILD_DIR/Tor-$VERSION-$ARCH-Bundle" "Tor-$VERSION-$ARCH-Bundle.dmg"
|
||||
sudo chown "$USER" "Tor-$VERSION-$ARCH-Bundle.dmg"
|
||||
|
||||
sudo rm -rf $BUILD_DIR
|
|
@ -0,0 +1,2 @@
|
|||
Tor
|
||||
torstartup
|
Binary file not shown.
After Width: | Height: | Size: 12 KiB |
|
@ -0,0 +1,140 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# not a psueber-pretty uninstall script for the Tor bundle package
|
||||
# . this currently leaves ~/.tor, /var/log/tor and empty
|
||||
# directories /Library/Tor, /Library/Privoxy (see comment below)
|
||||
# . this relies on the fact that the startup items directories (if any)
|
||||
# will be named the same as the package name (ie. Tor)
|
||||
#
|
||||
#
|
||||
# version history
|
||||
# initial version - 21 may, 2005 - loki der quaeler
|
||||
#
|
||||
#
|
||||
# comments
|
||||
# loki: because of the way the Tor package installs itself (the root directory
|
||||
# is the filesystem root, as opposed to the much nicer way that privoxy
|
||||
# installs itself with the privoxy home (/Library/Privoxy) as its
|
||||
# install root directory), i thought it more prudent to leave empty
|
||||
# directories laying around rather than try to incorrectly intuit from
|
||||
# the bom contents what directories should exist and which ones could be
|
||||
# deleted (ie, the Tor package has /Library listed in its bom --
|
||||
# obviously this is a Bad Thing(tm) to delete).
|
||||
# + when the Tor installer is changed, this uninstaller could be modified.
|
||||
# loki: /bin/ps, when run from a terminal window in osX, restricts information
|
||||
# based on the width of the window. an 80 col window will stupidly cause
|
||||
# the grep search for the privoxy pid to not find the pid, whereas the grep
|
||||
# in a wider window succeeds. consider using killall. in the meantime,
|
||||
# advise uninstall runners to drag wide their terminal window.. ugh
|
||||
#
|
||||
|
||||
|
||||
### this is the location of a file which contains all the actual package names
|
||||
## (ie "Tor", "torstartup", ...) the list should be new-line-delimited.
|
||||
PACKAGE_LIST_SRC=/Library/Tor/package_list.txt
|
||||
|
||||
### this is the name of the user created in the install process of Tor
|
||||
TOR_USER=_tor
|
||||
|
||||
### these should be constant across all osX installs (so leave them be)
|
||||
STARTUP_ITEMS_DIR=/Library/StartupItems
|
||||
PKG_RCPT_BASE_DIR=/Library/Receipts
|
||||
BOM_INTERMEDIATE_DIR=Contents/Resources
|
||||
INFO_INTERMEDIATE_DIR=$BOM_INTERMEDIATE_DIR/English.lproj
|
||||
TEMP_BOM_CONTENTS=/tmp/tor_uninst_scratch
|
||||
|
||||
### make sure the script is being run as root, barf if not
|
||||
if [ "`whoami`" != "root" ]; then
|
||||
echo "Must be root to run the uninstall script."
|
||||
exit -1
|
||||
fi
|
||||
|
||||
|
||||
### check to see if tor is currently running, kill it if it is
|
||||
## we grep on 'Tor/tor ' because 'tor' is too common (like in 'directory')
|
||||
## -- this relies on the fact that tor has been started with command
|
||||
## line arguments.. :-/
|
||||
TOR_PID=`ps -uax | grep 'Tor/tor ' | grep -v grep | awk '{print $2;}'`
|
||||
if [ ${#TOR_PID} -gt 0 ]; then
|
||||
echo ". Killing currently running tor process, pid is $TOR_PID"
|
||||
kill -9 $TOR_PID
|
||||
else
|
||||
echo ". tor process appears to already be stopped"
|
||||
fi
|
||||
|
||||
|
||||
### check to see if privoxy is currently running, kill it if it is
|
||||
PRIVOXY_PID=`ps -uax | grep privoxy | grep -v grep | awk '{print $2;}'`
|
||||
if [ ${#PRIVOXY_PID} -gt 0 ]; then
|
||||
echo ". Killing currently running privoxy process, pid is $PRIVOXY_PID"
|
||||
kill -9 $PRIVOXY_PID
|
||||
else
|
||||
echo ". privoxy process appears to already be stopped"
|
||||
fi
|
||||
|
||||
|
||||
## grab each package name from the package list file
|
||||
while read LINE; do
|
||||
if [ ${#LINE} -gt 0 ]; then
|
||||
PACKAGE_NAME=$LINE.pkg
|
||||
PACKAGE_PATH=$PKG_RCPT_BASE_DIR/$PACKAGE_NAME
|
||||
echo ". Uninstalling $PACKAGE_NAME"
|
||||
if [ ! -d $PACKAGE_PATH ]; then
|
||||
echo " . No receipt exists for this package -- skipping."
|
||||
|
||||
continue
|
||||
fi
|
||||
|
||||
|
||||
## get rid of the startup item if it exists
|
||||
STARTUP_DIR=$STARTUP_ITEMS_DIR/$LINE
|
||||
if [ -d $STARTUP_DIR ]; then
|
||||
echo " . Deleting startup item $STARTUP_DIR"
|
||||
rm -rf $STARTUP_DIR
|
||||
fi
|
||||
|
||||
|
||||
## determine the root directory of the the relative paths specified in the bom
|
||||
DEFAULT_LOC=`grep DefaultLocation $PACKAGE_PATH/$INFO_INTERMEDIATE_DIR/$LINE.info | awk '{print $2;}'`
|
||||
if [ ${#DEFAULT_LOC} -eq 0 ]; then
|
||||
echo "!! Could not find default location for $LINE package -- skipping package."
|
||||
|
||||
continue
|
||||
fi
|
||||
|
||||
## examine the list of installed items desribed in the bom
|
||||
BOM_FILE=$PACKAGE_PATH/$BOM_INTERMEDIATE_DIR/$LINE.bom
|
||||
lsbom $BOM_FILE > $TEMP_BOM_CONTENTS
|
||||
while read BOM_ITEM; do
|
||||
## 3 column items describe just directories, 5 column items describe actual files
|
||||
COL_COUNT=$(echo $BOM_ITEM | awk '{print NF;}')
|
||||
if [ "$COL_COUNT" -eq 5 ]; then
|
||||
FILE_NAME=$DEFAULT_LOC/$(echo $BOM_ITEM | awk '{print $1;}')
|
||||
|
||||
echo " . Removing $FILE_NAME"
|
||||
rm -rf $FILE_NAME
|
||||
fi
|
||||
done < $TEMP_BOM_CONTENTS
|
||||
|
||||
## remove package receipt
|
||||
echo " . Removing package receipt $PACKAGE_PATH"
|
||||
rm -rf $PACKAGE_PATH
|
||||
fi
|
||||
done < $PACKAGE_LIST_SRC
|
||||
|
||||
|
||||
## nuke the user created by the install process.
|
||||
echo ". Removing created user $TOR_USER"
|
||||
if [ -x /usr/bin/dscl ]; then
|
||||
dscl . -delete /users/$TOR_USER
|
||||
else
|
||||
niutil -destroy . /users/$TOR_USER
|
||||
fi
|
||||
|
||||
## clean up
|
||||
echo ". Cleaning up"
|
||||
rm -rf $TEMP_BOM_CONTENTS
|
||||
rm -rf /Library/Privoxy/ /Library/StartupItems/Privoxy/ /Library/Tor/ /Library/StartupItems/Tor/ /Library/Torbutton/ /Library/Receipts/Privoxy.pkg /Library/Receipts/torbutton.pkg /Library/Receipts/Tor.pkg /Library/Receipts/Vidalia.pkg /Library/Receipts/TorStartup.pkg
|
||||
|
||||
echo ". Finished"
|
||||
|
|
@ -40,7 +40,7 @@
|
|||
# you know what you are doing.
|
||||
|
||||
# Start in the tor source directory after you've compiled tor.exe
|
||||
# This means start as ./contrib/win32build/package_nsis-mingw.sh
|
||||
# This means start as ./contrib/package_nsis-mingw.sh
|
||||
|
||||
rm -rf win_tmp
|
||||
mkdir win_tmp
|
||||
|
@ -56,7 +56,7 @@ mkdir win_tmp/tmp
|
|||
|
||||
cp src/or/tor.exe win_tmp/bin/
|
||||
cp src/tools/tor-resolve.exe win_tmp/bin/
|
||||
cp contrib/win32build/tor.ico win_tmp/bin/
|
||||
cp contrib/tor.ico win_tmp/bin/
|
||||
cp src/config/geoip win_tmp/bin/
|
||||
strip win_tmp/bin/*.exe
|
||||
|
||||
|
@ -88,8 +88,8 @@ done
|
|||
|
||||
clean_localstatedir src/config/torrc.sample.in win_tmp/src/config/torrc.sample
|
||||
|
||||
cp contrib/win32build/tor-mingw.nsi.in win_tmp/contrib/
|
||||
cp contrib/tor-mingw.nsi.in win_tmp/contrib/
|
||||
|
||||
cd win_tmp
|
||||
makensis.exe contrib/tor-mingw.nsi.in
|
||||
"C:\Program Files\NSIS\makensis.exe" contrib/tor-mingw.nsi.in
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue