mirror of
https://gitdl.cn/https://github.com/chakralinux/desktop.git
synced 2025-01-24 02:22:13 +08:00
tor: update to 0.2.8.9
- confclits with vidalia to force removal of unsupported application - use upstream tor.service file, remove git one - sync torrc with upstream - add check() function for triggering upstream test suite
This commit is contained in:
parent
7d9dae7766
commit
1e57c8e35e
22
tor/PKGBUILD
22
tor/PKGBUILD
@ -1,5 +1,5 @@
|
||||
pkgname=tor
|
||||
pkgver=0.2.8.7
|
||||
pkgver=0.2.8.9
|
||||
pkgrel=1
|
||||
pkgdesc="Anonymizing overlay network"
|
||||
arch=('x86_64')
|
||||
@ -8,6 +8,7 @@ license=('BSD')
|
||||
depends=('openssl' 'libevent' 'torsocks' 'bash' 'libseccomp')
|
||||
makedepends=('ca-certificates')
|
||||
backup=('etc/tor/torrc' 'etc/tor/torrc-dist')
|
||||
conflicts=('vidalia') # to enforce removal of unsupported software, not really conflicts
|
||||
categories=('network')
|
||||
install=${pkgname}.install
|
||||
option=('!docs' '!emptydirs')
|
||||
@ -15,12 +16,13 @@ source=("http://www.torproject.org/dist/${pkgname}-${pkgver}.tar.gz"{,.asc}
|
||||
'torrc'
|
||||
'tor.conf.d'
|
||||
'tor.service')
|
||||
md5sums=('59771fe2d098893fe955edfb8b13401f'
|
||||
md5sums=('e1f8bc2b2e2b365fc916388304e5e40d'
|
||||
'SKIP'
|
||||
'bb7b85a70c2997a3e05f023c97768f5e'
|
||||
'173621ad48f0052b95eb9786a1c0302c'
|
||||
'f656f3e93f0c2ed46464d9b784876dbc'
|
||||
'98901f7dfa85b352b806ba7b0d66b7d0')
|
||||
validpgpkeys=('B35BF85BF19489D04E28C33C21194EBB165733EA')
|
||||
validpgpkeys=('B35BF85BF19489D04E28C33C21194EBB165733EA'
|
||||
'2133BC600AB133E1D826D173FE43009C4607B1FB')
|
||||
|
||||
|
||||
build() {
|
||||
@ -28,10 +30,17 @@ build() {
|
||||
|
||||
./configure --prefix=/usr \
|
||||
--sysconfdir=/etc \
|
||||
--localstatedir=/var
|
||||
--localstatedir=/var \
|
||||
--enable-systemd
|
||||
make
|
||||
}
|
||||
|
||||
check() {
|
||||
cd "${srcdir}/${pkgname}-${pkgver}"
|
||||
make test
|
||||
make check
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "${srcdir}/${pkgname}-${pkgver}"
|
||||
|
||||
@ -40,12 +49,11 @@ package() {
|
||||
install -dm0700 "${pkgdir}/var/lib/tor"
|
||||
|
||||
# Install config files
|
||||
mv "${pkgdir}/etc/tor/torrc.sample" "${pkgdir}/etc/tor/torrc-dist"
|
||||
install -Dm0644 "${srcdir}/torrc" "${pkgdir}/etc/tor/torrc"
|
||||
install -Dm0644 "${srcdir}/tor.conf.d" "${pkgdir}/etc/conf.d/tor"
|
||||
|
||||
# Install systemd service file
|
||||
install -Dm0644 "${srcdir}/tor.service" "${pkgdir}/usr/lib/systemd/system/tor.service"
|
||||
install -Dm0644 "contrib/dist/tor.service" "${pkgdir}/usr/lib/systemd/system/tor.service"
|
||||
|
||||
# Install license
|
||||
install -Dm0644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
|
||||
|
@ -1,14 +0,0 @@
|
||||
[Unit]
|
||||
Description=Anonymizing Overlay Network
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=forking
|
||||
GuessMainPID=yes
|
||||
EnvironmentFile=/etc/conf.d/tor
|
||||
ExecStart=/usr/bin/tor -f $TOR_CONF $TOR_ARGS
|
||||
ExecReload=/bin/kill -HUP $MAINPID
|
||||
KillSignal=SIGINT
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
85
tor/torrc
85
tor/torrc
@ -1,6 +1,5 @@
|
||||
## CONFIGURED FOR CHAKRA LINUX - 2014/04
|
||||
|
||||
## Last updated 22 April 2012 for Tor 0.2.3.14-alpha
|
||||
## Configured for Chakra Linux - 2016.11
|
||||
## Last updated 22 September 2015 for Tor 0.2.7.3-alpha.
|
||||
## (may or may not work for much older or much newer versions of Tor.)
|
||||
##
|
||||
## Lines that begin with "## " try to explain what's going on. Lines
|
||||
@ -10,24 +9,23 @@
|
||||
## See 'man tor', or https://www.torproject.org/docs/tor-manual.html,
|
||||
## for more options you can use in this file.
|
||||
##
|
||||
## On Unix, Tor will look for this file in various places
|
||||
## (like "~/.tor/torrc" or "/etc/torrc") based on your platform:
|
||||
## Tor will look for this file in various places based on your platform:
|
||||
## https://www.torproject.org/docs/faq#torrc
|
||||
|
||||
## Tor opens a socks proxy on port 9050 by default -- even if you don't
|
||||
## configure one below. Set "SocksPort 0" if you plan to run Tor only
|
||||
## Tor opens a SOCKS proxy on port 9050 by default -- even if you don't
|
||||
## configure one below. Set "SOCKSPort 0" if you plan to run Tor only
|
||||
## as a relay, and not make any local application connections yourself.
|
||||
SocksPort 9050 # what port to open for local application connections
|
||||
SocksBindAddress 127.0.0.1 # accept connections only from localhost
|
||||
#SocksBindAddress 192.168.0.1:9100 # listen on a chosen IP/port too
|
||||
#SOCKSPort 9050 # Default: Bind to localhost:9050 for local connections.
|
||||
#SOCKSPort 192.168.0.1:9100 # Bind to this address:port too.
|
||||
|
||||
## Entry policies to allow/deny SOCKS requests based on IP address.
|
||||
## First entry that matches wins. If no SocksPolicy is set, we accept
|
||||
## all (and only) requests that reach a SocksPort. Untrusted users who
|
||||
## can access your SocksPort may be able to learn about the connections
|
||||
## First entry that matches wins. If no SOCKSPolicy is set, we accept
|
||||
## all (and only) requests that reach a SOCKSPort. Untrusted users who
|
||||
## can access your SOCKSPort may be able to learn about the connections
|
||||
## you make.
|
||||
#SocksPolicy accept 192.168.0.1/16
|
||||
#SocksPolicy reject *
|
||||
#SOCKSPolicy accept 192.168.0.0/16
|
||||
#SOCKSPolicy accept6 FC00::/7
|
||||
#SOCKSPolicy reject *
|
||||
|
||||
## Logs go to stdout at level "notice" unless redirected by something
|
||||
## else, like one of the below lines. You can have as many Log lines as
|
||||
@ -46,7 +44,8 @@ Log notice syslog
|
||||
#Log debug stderr
|
||||
|
||||
## Uncomment this to start the process in the background... or use
|
||||
## --runasdaemon 1 on the command line.
|
||||
## --runasdaemon 1 on the command line. This is ignored on Windows;
|
||||
## see the FAQ entry if you want Tor to run as an NT service.
|
||||
RunAsDaemon 1
|
||||
User tor
|
||||
Group tor
|
||||
@ -105,28 +104,32 @@ DataDirectory /var/lib/tor
|
||||
|
||||
## Define these to limit how much relayed traffic you will allow. Your
|
||||
## own traffic is still unthrottled. Note that RelayBandwidthRate must
|
||||
## be at least 20 KB.
|
||||
## Note that units for these config options are bytes per second, not bits
|
||||
## per second, and that prefixes are binary prefixes, i.e. 2^10, 2^20, etc.
|
||||
#RelayBandwidthRate 100 KB # Throttle traffic to 100KB/s (800Kbps)
|
||||
#RelayBandwidthBurst 200 KB # But allow bursts up to 200KB/s (1600Kbps)
|
||||
## be at least 20 kilobytes per second.
|
||||
## Note that units for these config options are bytes (per second), not
|
||||
## bits (per second), and that prefixes are binary prefixes, i.e. 2^10,
|
||||
## 2^20, etc.
|
||||
#RelayBandwidthRate 100 KBytes # Throttle traffic to 100KB/s (800Kbps)
|
||||
#RelayBandwidthBurst 200 KBytes # But allow bursts up to 200KB (1600Kb)
|
||||
|
||||
## Use these to restrict the maximum traffic per day, week, or month.
|
||||
## Note that this threshold applies separately to sent and received bytes,
|
||||
## not to their sum: setting "4 GB" may allow up to 8 GB total before
|
||||
## not to their sum: setting "40 GB" may allow up to 80 GB total before
|
||||
## hibernating.
|
||||
##
|
||||
## Set a maximum of 4 gigabytes each way per period.
|
||||
#AccountingMax 4 GB
|
||||
## Set a maximum of 40 gigabytes each way per period.
|
||||
#AccountingMax 40 GBytes
|
||||
## Each period starts daily at midnight (AccountingMax is per day)
|
||||
#AccountingStart day 00:00
|
||||
## Each period starts on the 3rd of the month at 15:00 (AccountingMax
|
||||
## is per month)
|
||||
#AccountingStart month 3 15:00
|
||||
|
||||
## Contact info to be published in the directory, so we can contact you
|
||||
## if your relay is misconfigured or something else goes wrong. Google
|
||||
## indexes this, so spammers might also collect it.
|
||||
## Administrative contact information for this relay or bridge. This line
|
||||
## can be used to contact you if your relay or bridge is misconfigured or
|
||||
## something else goes wrong. Note that we archive and publish all
|
||||
## descriptors containing these lines and that Google indexes them, so
|
||||
## spammers might also collect them. You may want to obscure the fact that
|
||||
## it's an email address and/or generate a new address for this purpose.
|
||||
#ContactInfo Random Person <nobody AT example dot com>
|
||||
## You might also include your PGP or GPG fingerprint if you have one:
|
||||
#ContactInfo 0xFFFFFFFF Random Person <nobody AT example dot com>
|
||||
@ -152,14 +155,20 @@ DataDirectory /var/lib/tor
|
||||
## using more than one of your relays in a single circuit. See
|
||||
## https://www.torproject.org/docs/faq#MultipleRelays
|
||||
## However, you should never include a bridge's fingerprint here, as it would
|
||||
## break its concealability and potentionally reveal its IP/TCP address.
|
||||
## break its concealability and potentially reveal its IP/TCP address.
|
||||
#MyFamily $keyid,$keyid,...
|
||||
|
||||
## A comma-separated list of exit policies. They're considered first
|
||||
## to last, and the first match wins. If you want to _replace_
|
||||
## the default exit policy, end this with either a reject *:* or an
|
||||
## accept *:*. Otherwise, you're _augmenting_ (prepending to) the
|
||||
## default exit policy. Leave commented to just use the default, which is
|
||||
## to last, and the first match wins.
|
||||
##
|
||||
## If you want to allow the same ports on IPv4 and IPv6, write your rules
|
||||
## using accept/reject *. If you want to allow different ports on IPv4 and
|
||||
## IPv6, write your IPv6 rules using accept6/reject6 *6, and your IPv4 rules
|
||||
## using accept/reject *4.
|
||||
##
|
||||
## If you want to _replace_ the default exit policy, end this with either a
|
||||
## reject *:* or an accept *:*. Otherwise, you're _augmenting_ (prepending to)
|
||||
## the default exit policy. Leave commented to just use the default, which is
|
||||
## described in the man page or at
|
||||
## https://www.torproject.org/documentation.html
|
||||
##
|
||||
@ -171,11 +180,15 @@ DataDirectory /var/lib/tor
|
||||
## users will be told that those destinations are down.
|
||||
##
|
||||
## For security, by default Tor rejects connections to private (local)
|
||||
## networks, including to your public IP address. See the man page entry
|
||||
## for ExitPolicyRejectPrivate if you want to allow "exit enclaving".
|
||||
## networks, including to the configured primary public IPv4 and IPv6 addresses,
|
||||
## and any public IPv4 and IPv6 addresses on any interface on the relay.
|
||||
## See the man page entry for ExitPolicyRejectPrivate if you want to allow
|
||||
## "exit enclaving".
|
||||
##
|
||||
#ExitPolicy accept *:6660-6667,reject *:* # allow irc ports but no more
|
||||
#ExitPolicy accept *:119 # accept nntp as well as default exit policy
|
||||
#ExitPolicy accept *:6660-6667,reject *:* # allow irc ports on IPv4 and IPv6 but no more
|
||||
#ExitPolicy accept *:119 # accept nntp ports on IPv4 and IPv6 as well as default exit policy
|
||||
#ExitPolicy accept *4:119 # accept nntp ports on IPv4 only as well as default exit policy
|
||||
#ExitPolicy accept6 *6:119 # accept nntp ports on IPv6 only as well as default exit policy
|
||||
#ExitPolicy reject *:* # no exits allowed
|
||||
|
||||
## Bridge relays (or "bridges") are Tor relays that aren't listed in the
|
||||
|
Loading…
Reference in New Issue
Block a user