diff --git a/Makefile b/Makefile old mode 100755 new mode 100644 index cacc103f..b9a85ff7 --- a/Makefile +++ b/Makefile @@ -1,51 +1,45 @@ APP=pybitmessage VERSION=0.3.4 -DEST_SHARE=${DESTDIR}/usr/share -DEST_APP=${DEST_SHARE}/${APP} +RELEASE=1 +ARCH_TYPE=`uname -m` all: - debug: - source: tar -cvzf ../${APP}_${VERSION}.orig.tar.gz ../${APP}-${VERSION} --exclude-vcs - install: - mkdir -m 755 -p ${DESTDIR}/usr/bin - mkdir -m 755 -p ${DEST_APP} - mkdir -m 755 -p ${DEST_SHARE}/applications - mkdir -m 755 -p ${DEST_APP}/images - mkdir -m 755 -p ${DEST_APP}/pyelliptic - mkdir -m 755 -p ${DEST_APP}/socks - mkdir -m 755 -p ${DEST_APP}/bitmessageqt - mkdir -m 755 -p ${DEST_APP}/translations - mkdir -m 755 -p ${DEST_SHARE}/pixmaps - mkdir -m 755 -p ${DEST_SHARE}/icons - mkdir -m 755 -p ${DEST_SHARE}/icons/hicolor - mkdir -m 755 -p ${DEST_SHARE}/icons/hicolor/scalable - mkdir -m 755 -p ${DEST_SHARE}/icons/hicolor/scalable/apps - mkdir -m 755 -p ${DEST_SHARE}/icons/hicolor/24x24 - mkdir -m 755 -p ${DEST_SHARE}/icons/hicolor/24x24/apps - - cp -r src/* ${DEST_APP} - install -m 755 debian/pybm ${DESTDIR}/usr/bin/${APP} - - install -m 644 desktop/${APP}.desktop ${DEST_SHARE}/applications/${APP}.desktop - install -m 644 src/images/can-icon-24px.png ${DEST_SHARE}/icons/hicolor/24x24/apps/${APP}.png - install -m 644 desktop/can-icon.svg ${DEST_SHARE}/icons/hicolor/scalable/apps/${APP}.svg - install -m 644 desktop/can-icon.svg ${DEST_SHARE}/pixmaps/${APP}.svg - + mkdir -p ${DESTDIR}/usr + mkdir -p ${DESTDIR}/usr/bin + mkdir -m 755 -p ${DESTDIR}/usr/share + mkdir -m 755 -p ${DESTDIR}/usr/share/man + mkdir -m 755 -p ${DESTDIR}/usr/share/man/man1 + install -m 644 man/${APP}.1.gz ${DESTDIR}/usr/share/man/man1 + mkdir -m 755 -p ${DESTDIR}/usr/share/${APP} + mkdir -m 755 -p ${DESTDIR}/usr/share/applications + mkdir -m 755 -p ${DESTDIR}/usr/share/pixmaps + mkdir -m 755 -p ${DESTDIR}/usr/share/icons + mkdir -m 755 -p ${DESTDIR}/usr/share/icons/hicolor + mkdir -m 755 -p ${DESTDIR}/usr/share/icons/hicolor/scalable + mkdir -m 755 -p ${DESTDIR}/usr/share/icons/hicolor/scalable/apps + mkdir -m 755 -p ${DESTDIR}/usr/share/icons/hicolor/24x24 + mkdir -m 755 -p ${DESTDIR}/usr/share/icons/hicolor/24x24/apps + install -m 644 desktop/${APP}.desktop ${DESTDIR}/usr/share/applications/${APP}.desktop + install -m 644 desktop/icon24.png ${DESTDIR}/usr/share/icons/hicolor/24x24/apps/${APP}.png + cp -rf src/* ${DESTDIR}/usr/share/${APP} + echo '#!/bin/sh' > ${DESTDIR}/usr/bin/${APP} + echo 'cd /usr/share/pybitmessage' >> ${DESTDIR}/usr/bin/${APP} + echo 'LD_LIBRARY_PATH="/opt/openssl-compat-bitcoin/lib/" exec python2 bitmessagemain.py' >> ${DESTDIR}/usr/bin/${APP} + chmod +x ${DESTDIR}/usr/bin/${APP} uninstall: - rm -Rf "${DEST_APP}" - rm -f "${DESTDIR}/usr/bin/${APP}" - rm -f "${DEST_SHARE}/applications/${APP}.desktop" - rm -f "${DEST_SHARE}/icons/hicolor/24x24/apps/${APP}.png" - rm -f "${DEST_SHARE}/icons/hicolor/scalable/apps/${APP}.svg" - rm -f "${DEST_SHARE}/pixmaps/${APP}.svg" - + rm -f /usr/share/man/man1/${APP}.1.gz + rm -rf /usr/share/${APP} + rm -f /usr/bin/${APP} + rm -f /usr/share/applications/${APP}.desktop + rm -f /usr/share/icons/hicolor/scalable/apps/${APP}.svg + /usr/share/pixmaps/${APP}.svg clean: - rm -rf debian/${APP} - rm -f ../${APP}_*.deb ../${APP}_*.asc ../${APP}_*.dsc ../${APP}*.changes - rm -f *.sh~ src/*.pyc src/socks/*.pyc src/pyelliptic/*.pyc - rm -f *.deb \#* \.#* debian/*.log debian/*.substvars - rm -f Makefile~ + rm -f ${APP} \#* \.#* gnuplot* *.png debian/*.substvars debian/*.log + rm -fr deb.* debian/${APP} rpmpackage/${ARCH_TYPE} + rm -f ../${APP}*.deb ../${APP}*.changes ../${APP}*.asc ../${APP}*.dsc + rm -f rpmpackage/*.src.rpm archpackage/*.gz archpackage/*.xz + rm -f puppypackage/*.gz puppypackage/*.pet slackpackage/*.txz diff --git a/arch.sh b/arch.sh new file mode 100755 index 00000000..77332d09 --- /dev/null +++ b/arch.sh @@ -0,0 +1,48 @@ +#!/bin/bash + +APP=pybitmessage +PREV_VERSION=0.3.4 +VERSION=0.3.4 +RELEASE=1 +ARCH_TYPE=`uname -m` +CURRDIR=`pwd` +SOURCE=archpackage/${APP}-${VERSION}.tar.gz + +# Update version numbers automatically - so you don't have to +sed -i 's/VERSION='${PREV_VERSION}'/VERSION='${VERSION}'/g' Makefile debian.sh rpm.sh puppy.sh ebuild.sh slack.sh +sed -i 's/Version: '${PREV_VERSION}'/Version: '${VERSION}'/g' rpmpackage/${APP}.spec +sed -i 's/Release: '${RELEASE}'/Release: '${RELEASE}'/g' rpmpackage/${APP}.spec +sed -i 's/pkgrel='${RELEASE}'/pkgrel='${RELEASE}'/g' archpackage/PKGBUILD +sed -i 's/pkgver='${PREV_VERSION}'/pkgver='${VERSION}'/g' archpackage/PKGBUILD +sed -i "s/-${PREV_VERSION}-/-${VERSION}-/g" puppypackage/*.specs +sed -i "s/|${PREV_VERSION}|/|${VERSION}|/g" puppypackage/*.specs +sed -i 's/VERSION='${PREV_VERSION}'/VERSION='${VERSION}'/g' puppypackage/pinstall.sh puppypackage/puninstall.sh +sed -i 's/-'${PREV_VERSION}'.so/-'${VERSION}'.so/g' debian/*.links + + +# Create the source code +make clean +rm -f archpackage/*.gz + +# having the root directory called name-version seems essential +mv ../${APP} ../${APP}-${VERSION} +tar -cvzf ${SOURCE} ../${APP}-${VERSION} --exclude-vcs + +# rename the root directory without the version number +mv ../${APP}-${VERSION} ../${APP} + +# calculate the MD5 checksum +CHECKSM=$(md5sum ${SOURCE}) +sed -i "s/md5sums[^)]*)/md5sums=(${CHECKSM%% *})/g" archpackage/PKGBUILD + +cd archpackage + +# Create the package +tar -c -f ${APP}-${VERSION}.pkg.tar . +sync +xz ${APP}-${VERSION}.pkg.tar +sync + +# Move back to the original directory +cd ${CURRDIR} + diff --git a/archpackage/PKGBUILD b/archpackage/PKGBUILD new file mode 100644 index 00000000..79ee8ded --- /dev/null +++ b/archpackage/PKGBUILD @@ -0,0 +1,31 @@ +# Maintainer: Bob Mottram (4096 bits) +pkgname=pybitmessage +pkgver=0.3.4 +pkgrel=1 +pkgdesc="Bitmessage is a P2P communications protocol used to send encrypted messages to another person or to many subscribers. It is decentralized and trustless, meaning that you need-not inherently trust any entities like root certificate authorities. It uses strong authentication which means that the sender of a message cannot be spoofed, and it aims to hide "non-content" data, like the sender and receiver of messages, from passive eavesdroppers like those running warrantless wiretapping programs." +arch=('i686' 'x86_64') +url="https://github.com/Bitmessage/PyBitmessage" +license=('MIT') +groups=() +depends=('python2' 'qt4' 'python2-pyqt4' 'sqlite' 'openssl') +makedepends=() +optdepends=('python2-gevent') +provides=() +conflicts=() +replaces=() +backup=() +options=() +install= +changelog= +source=($pkgname-$pkgver.tar.gz) +noextract=() +md5sums=() +build() { + cd "$srcdir/$pkgname-$pkgver" + ./configure --prefix=/usr + make +} +package() { + cd "$srcdir/$pkgname-$pkgver" + make DESTDIR="$pkgdir/" install +} diff --git a/configure b/configure new file mode 100755 index 00000000..0519ecba --- /dev/null +++ b/configure @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/debian.sh b/debian.sh old mode 100755 new mode 100644 index 10cbf61e..2d924251 --- a/debian.sh +++ b/debian.sh @@ -1,32 +1,46 @@ -# To build a debian package first ensure that the code exists -# within a directory called pybitmessage-x.x.x (where the x's -# are the version number), make sure that the VERSION parameter -# within debian/rules and this script are correct, then run -# this script. - #!/bin/bash APP=pybitmessage -PREV_VERSION=0.3.3 +PREV_VERSION=0.3.4 VERSION=0.3.4 RELEASE=1 -ARCH_TYPE=all +ARCH_TYPE=`uname -m` +DIR=${APP}-${VERSION} -#update version numbers automatically - so you don't have to -sed -i 's/VERSION='${PREV_VERSION}'/VERSION='${VERSION}'/g' Makefile -sed -i 's/'''${PREV_VERSION}'''/'''${VERSION}'''/g' src/shared.py +if [ $ARCH_TYPE == "x86_64" ]; then + ARCH_TYPE="amd64" +fi +if [ $ARCH_TYPE == "i686" ]; then + ARCH_TYPE="i386" +fi + + +# Update version numbers automatically - so you don't have to +sed -i 's/VERSION='${PREV_VERSION}'/VERSION='${VERSION}'/g' Makefile rpm.sh arch.sh puppy.sh ebuild.sh slack.sh +sed -i 's/Version: '${PREV_VERSION}'/Version: '${VERSION}'/g' rpmpackage/${APP}.spec +sed -i 's/Release: '${RELEASE}'/Release: '${RELEASE}'/g' rpmpackage/${APP}.spec +sed -i 's/pkgrel='${RELEASE}'/pkgrel='${RELEASE}'/g' archpackage/PKGBUILD +sed -i 's/pkgver='${PREV_VERSION}'/pkgver='${VERSION}'/g' archpackage/PKGBUILD +sed -i "s/-${PREV_VERSION}-/-${VERSION}-/g" puppypackage/*.specs +sed -i "s/|${PREV_VERSION}|/|${VERSION}|/g" puppypackage/*.specs +sed -i 's/VERSION='${PREV_VERSION}'/VERSION='${VERSION}'/g' puppypackage/pinstall.sh puppypackage/puninstall.sh +sed -i 's/-'${PREV_VERSION}'.so/-'${VERSION}'.so/g' debian/*.links + +make clean +make + +# change the parent directory name to debian format +mv ../${APP} ../${DIR} # Create a source archive -make clean -# change the directory name to pybitmessage-version -mv ../PyBitmessage ../${APP}-${VERSION} make source # Build the package -dpkg-buildpackage -A || exit 1 +dpkg-buildpackage -F -# change the directory name back -mv ../${APP}-${VERSION} ../PyBitmessage - -gpg -ba ../${APP}_${VERSION}-${RELEASE}_${ARCH_TYPE}.deb +# sign files +gpg -ba ../${APP}_${VERSION}-1_${ARCH_TYPE}.deb gpg -ba ../${APP}_${VERSION}.orig.tar.gz + +# restore the parent directory name +mv ../${DIR} ../${APP} diff --git a/debian/changelog b/debian/changelog index 1d822cd1..b6e8adbf 100644 --- a/debian/changelog +++ b/debian/changelog @@ -18,7 +18,7 @@ pybitmessage (0.3.3-1) raring; urgency=low via Portage (Gentoo) * Fix message authentication bug - -- Bob Mottram (4096 bits) Sun, 30 June 2013 11:23:00 +0100 + -- Bob Mottram (4096 bits) Sat, 29 June 2013 11:23:00 +0100 pybitmessage (0.3.211-1) raring; urgency=low @@ -26,7 +26,7 @@ pybitmessage (0.3.211-1) raring; urgency=low as the multiprocessing module does not work well with pyinstaller's --onefile option. - -- Bob Mottram (4096 bits) Sun, 30 June 2013 11:23:00 +0100 + -- Bob Mottram (4096 bits) Fri, 28 June 2013 11:23:00 +0100 pybitmessage (0.3.2-1) raring; urgency=low diff --git a/debian/compat b/debian/compat index 45a4fb75..ec635144 100644 --- a/debian/compat +++ b/debian/compat @@ -1 +1 @@ -8 +9 diff --git a/debian/control b/debian/control index 2dd19194..01bd7d8c 100644 --- a/debian/control +++ b/debian/control @@ -1,21 +1,21 @@ Source: pybitmessage -Section: contrib/comm Priority: extra -Maintainer: Jonathan Warren -Build-Depends: debhelper (>= 8.0.0), python (>= 2.7.0), openssl, python-qt4, libqt4-dev (>= 4.8.0), python-qt4-dev, sqlite3, libsqlite3-dev, libmessaging-menu-dev -Standards-Version: 3.9.2 -Homepage: https://bitmessage.org/ -Vcs-Browser: https://github.com/Bitmessage/PyBitmessage -Vcs-Git: https://github.com/Bitmessage/PyBitmessage.git +Maintainer: Bob Mottram (4096 bits) +Build-Depends: debhelper (>= 9.0.0) +Standards-Version: 3.9.4 +Homepage: https://github.com/Bitmessage/PyBitmessage +Vcs-Git: https://github.com/fuzzgun/fin.git Package: pybitmessage -Architecture: all -Depends: ${misc:Depends}, python (>= 2.7.0), openssl, python-qt4, libqt4-dev (>= 4.8.0), python-qt4-dev, sqlite3, libsqlite3-dev, libmessaging-menu-dev -Description: Send encrypted messages to another person or to many subscribers - Bitmessage is a P2P communications protocol used to send encrypted messages - to another person or to many subscribers. It is decentralized and trustless, - meaning that you need-not inherently trust any entities like root certificate - authorities. It uses strong authentication which means that the sender of a - message cannot be spoofed, and it aims to hide "non-content" data, like the - sender and receiver of messages, from passive eavesdroppers like those - running warrantless wiretapping programs. +Section: mail +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends}, python (>= 2.7.0), openssl, python-qt4, libqt4-dev (>= 4.8.0), python-qt4-dev, sqlite3, libsqlite3-dev +Suggests: libmessaging-menu-dev +Description: Send encrypted messages + Bitmessage is a P2P communications protocol used to send encrypted + messages to another person or to many subscribers. It is decentralized and + trustless, meaning that you need-not inherently trust any entities like + root certificate authorities. It uses strong authentication which means + that the sender of a message cannot be spoofed, and it aims to hide + "non-content" data, like the sender and receiver of messages, from passive + eavesdroppers like those running warrantless wiretapping programs. diff --git a/debian/copyright b/debian/copyright index 4c5f69f3..32f13f19 100644 --- a/debian/copyright +++ b/debian/copyright @@ -1,30 +1,30 @@ -Format: http://dep.debian.net/deps/dep5 -Upstream-Name: PyBitmessage -Source: https://github.com/Bitmessage/PyBitmessage +Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: +Source: Files: * -Copyright: 2012 Jonathan Warren +Copyright: Copyright 2013 Bob Mottram (4096 bits) License: MIT Files: debian/* -Copyright: 2012 Jonathan Warren +Copyright: Copyright 2013 Bob Mottram (4096 bits) License: MIT License: MIT - 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: + 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 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. \ No newline at end of file + 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. diff --git a/debian/manpages b/debian/manpages new file mode 100644 index 00000000..54af5648 --- /dev/null +++ b/debian/manpages @@ -0,0 +1 @@ +man/pybitmessage.1.gz diff --git a/debian/rules b/debian/rules old mode 100755 new mode 100644 index 2a7767b6..233679ca --- a/debian/rules +++ b/debian/rules @@ -1,66 +1,42 @@ #!/usr/bin/make -f -APP=pybitmessage -DESTDIR=${CURDIR}/debian/${APP} -DEST_SHARE=${DESTDIR}/usr/share -DEST_APP=${DEST_SHARE}/${APP} -build: build-stamp +APP=pybitmessage +build: build-stamp make build-arch: build-stamp build-indep: build-stamp build-stamp: - dh_testdir - touch build-stamp + dh_testdir + touch build-stamp + clean: - dh_testdir - dh_testroot - rm -f build-stamp - dh_clean -install: - dh_testdir - dh_testroot - dh_prep - dh_clean -k - dh_installdirs - - mkdir -m 755 -p ${DESTDIR}/usr/bin - mkdir -m 755 -p ${DEST_APP} - mkdir -m 755 -p ${DEST_SHARE}/applications - mkdir -m 755 -p ${DEST_APP}/images - mkdir -m 755 -p ${DEST_APP}/pyelliptic - mkdir -m 755 -p ${DEST_APP}/socks - mkdir -m 755 -p ${DEST_APP}/bitmessageqt - mkdir -m 755 -p ${DEST_APP}/translations - mkdir -m 755 -p ${DEST_SHARE}/pixmaps - mkdir -m 755 -p ${DEST_SHARE}/icons - mkdir -m 755 -p ${DEST_SHARE}/icons/hicolor - mkdir -m 755 -p ${DEST_SHARE}/icons/hicolor/scalable - mkdir -m 755 -p ${DEST_SHARE}/icons/hicolor/scalable/apps - mkdir -m 755 -p ${DEST_SHARE}/icons/hicolor/24x24 - mkdir -m 755 -p ${DEST_SHARE}/icons/hicolor/24x24/apps - - cp -r src/* ${DEST_APP} - install -m 755 debian/pybm ${DESTDIR}/usr/bin/${APP} - - install -m 644 desktop/${APP}.desktop ${DEST_SHARE}/applications/${APP}.desktop - install -m 644 src/images/can-icon-24px.png ${DEST_SHARE}/icons/hicolor/24x24/apps/${APP}.png - install -m 644 desktop/can-icon.svg ${DEST_SHARE}/icons/hicolor/scalable/apps/${APP}.svg - install -m 644 desktop/can-icon.svg ${DEST_SHARE}/pixmaps/${APP}.svg + dh_testdir + dh_testroot + rm -f build-stamp + dh_clean +install: build clean + dh_testdir + dh_testroot + dh_prep + dh_installdirs + ${MAKE} install -B DESTDIR=${CURDIR}/debian/${APP} binary-indep: build install - dh_shlibdeps - dh_testdir - dh_testroot - dh_installchangelogs - dh_installdocs -# dh_installman - dh_link - dh_compress - dh_fixperms - dh_installdeb - dh_gencontrol - dh_md5sums - dh_builddeb + dh_testdir + dh_testroot + dh_installchangelogs + dh_installdocs + dh_installexamples + dh_installman + dh_link + dh_compress + dh_fixperms + dh_installdeb + dh_gencontrol + dh_md5sums + dh_builddeb + binary-arch: build install + binary: binary-indep binary-arch -.PHONY: build clean binary-indep binary install +.PHONY: build clean binary-indep binary-arch binary install diff --git a/desktop/icon14.xpm b/desktop/icon14.xpm new file mode 100644 index 00000000..6d50c8c7 --- /dev/null +++ b/desktop/icon14.xpm @@ -0,0 +1,111 @@ +/* XPM */ +static char * icon14_xpm[] = { +"14 14 94 2", +" c None", +". c #B9BABC", +"+ c #D2D3D4", +"@ c #BEBFC1", +"# c #CBCCCF", +"$ c #E0E3E1", +"% c #F6F8F8", +"& c #F3F3F3", +"* c #B9BABD", +"= c #C8C9CB", +"- c #DADCDB", +"; c #E6E8E7", +"> c #F7F7F7", +", c #FCFCFC", +"' c #F5F5F5", +") c #BCBDBF", +"! c #D3D5D5", +"~ c #E3E5E4", +"{ c #F1F2F2", +"] c #FDFDFD", +"^ c #F8F8F8", +"/ c #CBCCCC", +"( c #B2B3B6", +"_ c #B0B1B3", +": c #D3D4D6", +"< c #DFE0E0", +"[ c #EAEDEB", +"} c #FAF9F9", +"| c #DFE0DF", +"1 c #B9BBBD", +"2 c #C2C3C5", +"3 c #B7B8BC", +"4 c #CDCED0", +"5 c #DCDDDE", +"6 c #E7E9E7", +"7 c #F6F6F6", +"8 c #C0C1C2", +"9 c #DDDFDF", +"0 c #BCBCBF", +"a c #D7D9DA", +"b c #E2E4E3", +"c c #F0F2F1", +"d c #FAFAFA", +"e c #F9F9F9", +"f c #CCCDCD", +"g c #B6B7B9", +"h c #C7C8CA", +"i c #A6A7A9", +"j c #D3D4D5", +"k c #F2F5F3", +"l c #F1F2F1", +"m c #F6F8F7", +"n c #FCFBFC", +"o c #E8EAE9", +"p c #B6B7B8", +"q c #BFC0C2", +"r c #323138", +"s c #1D1D22", +"t c #111117", +"u c #4C4C51", +"v c #ECECED", +"w c #FFFFFF", +"x c #BBBDBD", +"y c #C9CACB", +"z c #333238", +"A c #313036", +"B c #27272C", +"C c #1E1F24", +"D c #16171D", +"E c #919193", +"F c #F2F3F3", +"G c #B4B5B7", +"H c #CDCFCF", +"I c #67666B", +"J c #37363C", +"K c #2C2B31", +"L c #2A292F", +"M c #16171C", +"N c #68696B", +"O c #C7C8C9", +"P c #CBCDCC", +"Q c #49474E", +"R c #39383E", +"S c #36353B", +"T c #333138", +"U c #28272D", +"V c #CED0D0", +"W c #67676C", +"X c #414046", +"Y c #424147", +"Z c #39383F", +"` c #8C8D8F", +" . c #6B6C70", +".. c #75757A", +" . + ", +" @ # $ % & ", +" * = - ; > , ' ", +" ) ! ~ { ] ^ / ( ", +" _ : < [ } , | 1 2 ", +" 3 4 5 6 7 , { 8 . 9 ", +" 2 0 a b c d e f g h ", +" i j k l m n o p q h ", +" r s t u v w ' x g y ", +" z A B C D E F G H ", +" I J A K L M N O P ", +" Q R R S T U V ", +" W X Y X Z ` ", +" ... "}; diff --git a/desktop/icon24.png b/desktop/icon24.png new file mode 100644 index 00000000..30f7313e Binary files /dev/null and b/desktop/icon24.png differ diff --git a/desktop/pybitmessage.desktop b/desktop/pybitmessage.desktop index 2b1b6902..a97bd664 100644 --- a/desktop/pybitmessage.desktop +++ b/desktop/pybitmessage.desktop @@ -2,29 +2,8 @@ Type=Application Name=PyBitmessage GenericName=PyBitmessage -X-GNOME-FullName=PyBitmessage Secure Messaging -Comment=Send encrypted messages to another person or to many subscribers -Exec=pybitmessage %U +Comment=Send encrypted messages +Exec=pybitmessage %F Icon=pybitmessage Terminal=false -Categories=Network;Email;Application; -Keywords=Email;E-mail;Newsgroup;Messaging; -X-MessagingMenu-UsesChatSection=true -X-Ubuntu-Gettext-Domain=pybitmessage - -Actions=Send;Subscribe;AddressBook; - -[Desktop Action Send] -Name=Send -Exec=pybitmessage -s -OnlyShowIn=Unity; - -[Desktop Action Subscribe] -Name=Subscribe -Exec=pybitmessage -b -OnlyShowIn=Unity; - -[Desktop Action AddressBook] -Name=Address Book -Exec=pybitmessage -a -OnlyShowIn=Unity; +Categories=Office;Email; diff --git a/ebuild.sh b/ebuild.sh new file mode 100755 index 00000000..1a3d16e0 --- /dev/null +++ b/ebuild.sh @@ -0,0 +1,33 @@ +#!/bin/bash + +APP=pybitmessage +PREV_VERSION=0.3.4 +VERSION=0.3.4 +RELEASE=1 +SOURCEDIR=. +ARCH_TYPE=`uname -m` +CURRDIR=`pwd` +SOURCE=~/ebuild/${APP}-${VERSION}.tar.gz + + +# Update version numbers automatically - so you don't have to +sed -i 's/VERSION='${PREV_VERSION}'/VERSION='${VERSION}'/g' Makefile debian.sh rpm.sh arch.sh puppy.sh slack.sh +sed -i 's/Version: '${PREV_VERSION}'/Version: '${VERSION}'/g' rpmpackage/${APP}.spec +sed -i 's/Release: '${RELEASE}'/Release: '${RELEASE}'/g' rpmpackage/${APP}.spec +sed -i 's/pkgrel='${RELEASE}'/pkgrel='${RELEASE}'/g' archpackage/PKGBUILD +sed -i 's/pkgver='${PREV_VERSION}'/pkgver='${VERSION}'/g' archpackage/PKGBUILD +sed -i "s/-${PREV_VERSION}-/-${VERSION}-/g" puppypackage/*.specs +sed -i "s/|${PREV_VERSION}|/|${VERSION}|/g" puppypackage/*.specs +sed -i 's/VERSION='${PREV_VERSION}'/VERSION='${VERSION}'/g' puppypackage/pinstall.sh puppypackage/puninstall.sh +sed -i 's/-'${PREV_VERSION}'.so/-'${VERSION}'.so/g' debian/*.links + +# create the source code in the SOURCES directory +make clean +mkdir -p ~/ebuild +rm -f ${SOURCE} +mv ../${APP} ../${APP}-${VERSION} +tar -cvzf ${SOURCE} ../${APP}-${VERSION} --exclude-vcs + +# rename the root directory without the version number +mv ../${APP}-${VERSION} ../${APP} + diff --git a/ebuildpackage/pybitmessage-0.3.4-1.ebuild b/ebuildpackage/pybitmessage-0.3.4-1.ebuild new file mode 100755 index 00000000..20f056e4 --- /dev/null +++ b/ebuildpackage/pybitmessage-0.3.4-1.ebuild @@ -0,0 +1,22 @@ +# $Header: $ + +EAPI=4 + +DESCRIPTION="Bitmessage is a P2P communications protocol used to send encrypted messages to another person or to many subscribers. It is decentralized and trustless, meaning that you need-not inherently trust any entities like root certificate authorities. It uses strong authentication which means that the sender of a message cannot be spoofed, and it aims to hide "non-content" data, like the sender and receiver of messages, from passive eavesdroppers like those running warrantless wiretapping programs." +HOMEPAGE="https://github.com/Bitmessage/PyBitmessage" +SRC_URI="${PN}/${P}.tar.gz" +LICENSE="MIT" +SLOT="0" +KEYWORDS="x86" +RDEPEND="dev-libs/popt" +DEPEND="${RDEPEND}" + +src_configure() { + econf --with-popt +} + +src_install() { + emake DESTDIR="${D}" install + # Install README and (Debian) changelog + dodoc README.md debian/changelog +} diff --git a/generate.sh b/generate.sh new file mode 100755 index 00000000..8909cf2f --- /dev/null +++ b/generate.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +# Generates packaging + +rm -f Makefile rpmpackage/*.spec + +packagemonkey -n "PyBitmessage" --version "0.3.4" --dir "." -l "mit" -e "Bob Mottram (4096 bits) " --brief "Send encrypted messages" --desc "Bitmessage is a P2P communications protocol used to send encrypted messages to another person or to many subscribers. It is decentralized and trustless, meaning that you need-not inherently trust any entities like root certificate authorities. It uses strong authentication which means that the sender of a message cannot be spoofed, and it aims to hide \"non-content\" data, like the sender and receiver of messages, from passive eavesdroppers like those running warrantless wiretapping programs." --homepage "https://github.com/Bitmessage/PyBitmessage" --section "mail" --categories "Office/Email" --dependsdeb "python (>= 2.7.0), openssl, python-qt4, libqt4-dev (>= 4.8.0), python-qt4-dev, sqlite3, libsqlite3-dev" --dependsrpm "python, PyQt4, openssl-compat-bitcoin-libs" --mainscript "bitmessagemain.py" --librarypath "/opt/openssl-compat-bitcoin/lib/" --suggestsdeb "libmessaging-menu-dev" --dependspuppy "openssl, python-qt4, sqlite3, sqlite3-dev, python-openssl, python-sip" --dependsarch "python2, qt4, python2-pyqt4, sqlite, openssl" --suggestsarch "python2-gevent" --pythonversion 2 diff --git a/man/pybitmessage.1.gz b/man/pybitmessage.1.gz new file mode 100644 index 00000000..efa686a8 Binary files /dev/null and b/man/pybitmessage.1.gz differ diff --git a/osx.sh b/osx.sh old mode 100755 new mode 100644 diff --git a/puppy.sh b/puppy.sh new file mode 100755 index 00000000..dd54ecc9 --- /dev/null +++ b/puppy.sh @@ -0,0 +1,66 @@ +#!/bin/bash + +APP=pybitmessage +PREV_VERSION=0.3.4 +VERSION=0.3.4 +RELEASE=1 +BUILDDIR=~/petbuild +CURRDIR=`pwd` +PROJECTDIR=${BUILDDIR}/${APP}-${VERSION}-${RELEASE} + +# Update version numbers automatically - so you don't have to +sed -i 's/VERSION='${PREV_VERSION}'/VERSION='${VERSION}'/g' Makefile debian.sh rpm.sh arch.sh ebuild.sh slack.sh +sed -i 's/Version: '${PREV_VERSION}'/Version: '${VERSION}'/g' rpmpackage/${APP}.spec +sed -i 's/Release: '${RELEASE}'/Release: '${RELEASE}'/g' rpmpackage/${APP}.spec +sed -i 's/pkgrel='${RELEASE}'/pkgrel='${RELEASE}'/g' archpackage/PKGBUILD +sed -i 's/pkgver='${PREV_VERSION}'/pkgver='${VERSION}'/g' archpackage/PKGBUILD +sed -i "s/-${PREV_VERSION}-/-${VERSION}-/g" puppypackage/*.specs +sed -i "s/|${PREV_VERSION}|/|${VERSION}|/g" puppypackage/*.specs +sed -i 's/VERSION='${PREV_VERSION}'/VERSION='${VERSION}'/g' puppypackage/pinstall.sh puppypackage/puninstall.sh +sed -i 's/-'${PREV_VERSION}'.so/-'${VERSION}'.so/g' debian/*.links + + +# Make directories within which the project will be built +mkdir -p ${BUILDDIR} +mkdir -p ${PROJECTDIR} + +# Build the project +make clean +make +make install -B DESTDIR=${PROJECTDIR} + +# Alter the desktop file categories +sed -i "s/Categories=Office;Email;/Categories=Internet;mailnews;/g" ${PROJECTDIR}/usr/share/applications/${APP}.desktop + +# Create directories specific to puppy +mkdir ${PROJECTDIR}/usr +mkdir ${PROJECTDIR}/usr/local +mkdir ${PROJECTDIR}/usr/local/bin + +# Copy anything in /usr/bin into /usr/local/bin +cp ${PROJECTDIR}/usr/bin/* ${PROJECTDIR}/usr/local/bin/ + +# Copy the spec file into the build directory +cp ${CURRDIR}/puppypackage/${APP}-${VERSION}.pet.specs ${PROJECTDIR} + +# Copy the XPM mini icon into the build directory +cp ${CURRDIR}/desktop/icon14.xpm ${PROJECTDIR}/${APP}.xpm + +# Compress the build directory +cd ${BUILDDIR} +tar -c -f ${APP}-${VERSION}-${RELEASE}.tar . +sync +gzip ${APP}-${VERSION}-${RELEASE}.tar +mv ${APP}-${VERSION}-${RELEASE}.tar.gz ${CURRDIR}/puppypackage +cd ${CURRDIR}/puppypackage + +# Create the PET package +MD5SUM="`md5sum ${APP}-${VERSION}-${RELEASE}.tar.gz | cut -f 1 -d ' '`" +echo -n "$MD5SUM" >> ${APP}-${VERSION}-${RELEASE}.tar.gz +sync +mv -f ${APP}-${VERSION}-${RELEASE}.tar.gz ${APP}-${VERSION}-${RELEASE}.pet +sync +cd ${CURRDIR} + +# Remove the temporary build directory +rm -fr ${BUILDDIR} diff --git a/puppypackage/icon14.xpm b/puppypackage/icon14.xpm new file mode 100644 index 00000000..6d50c8c7 --- /dev/null +++ b/puppypackage/icon14.xpm @@ -0,0 +1,111 @@ +/* XPM */ +static char * icon14_xpm[] = { +"14 14 94 2", +" c None", +". c #B9BABC", +"+ c #D2D3D4", +"@ c #BEBFC1", +"# c #CBCCCF", +"$ c #E0E3E1", +"% c #F6F8F8", +"& c #F3F3F3", +"* c #B9BABD", +"= c #C8C9CB", +"- c #DADCDB", +"; c #E6E8E7", +"> c #F7F7F7", +", c #FCFCFC", +"' c #F5F5F5", +") c #BCBDBF", +"! c #D3D5D5", +"~ c #E3E5E4", +"{ c #F1F2F2", +"] c #FDFDFD", +"^ c #F8F8F8", +"/ c #CBCCCC", +"( c #B2B3B6", +"_ c #B0B1B3", +": c #D3D4D6", +"< c #DFE0E0", +"[ c #EAEDEB", +"} c #FAF9F9", +"| c #DFE0DF", +"1 c #B9BBBD", +"2 c #C2C3C5", +"3 c #B7B8BC", +"4 c #CDCED0", +"5 c #DCDDDE", +"6 c #E7E9E7", +"7 c #F6F6F6", +"8 c #C0C1C2", +"9 c #DDDFDF", +"0 c #BCBCBF", +"a c #D7D9DA", +"b c #E2E4E3", +"c c #F0F2F1", +"d c #FAFAFA", +"e c #F9F9F9", +"f c #CCCDCD", +"g c #B6B7B9", +"h c #C7C8CA", +"i c #A6A7A9", +"j c #D3D4D5", +"k c #F2F5F3", +"l c #F1F2F1", +"m c #F6F8F7", +"n c #FCFBFC", +"o c #E8EAE9", +"p c #B6B7B8", +"q c #BFC0C2", +"r c #323138", +"s c #1D1D22", +"t c #111117", +"u c #4C4C51", +"v c #ECECED", +"w c #FFFFFF", +"x c #BBBDBD", +"y c #C9CACB", +"z c #333238", +"A c #313036", +"B c #27272C", +"C c #1E1F24", +"D c #16171D", +"E c #919193", +"F c #F2F3F3", +"G c #B4B5B7", +"H c #CDCFCF", +"I c #67666B", +"J c #37363C", +"K c #2C2B31", +"L c #2A292F", +"M c #16171C", +"N c #68696B", +"O c #C7C8C9", +"P c #CBCDCC", +"Q c #49474E", +"R c #39383E", +"S c #36353B", +"T c #333138", +"U c #28272D", +"V c #CED0D0", +"W c #67676C", +"X c #414046", +"Y c #424147", +"Z c #39383F", +"` c #8C8D8F", +" . c #6B6C70", +".. c #75757A", +" . + ", +" @ # $ % & ", +" * = - ; > , ' ", +" ) ! ~ { ] ^ / ( ", +" _ : < [ } , | 1 2 ", +" 3 4 5 6 7 , { 8 . 9 ", +" 2 0 a b c d e f g h ", +" i j k l m n o p q h ", +" r s t u v w ' x g y ", +" z A B C D E F G H ", +" I J A K L M N O P ", +" Q R R S T U V ", +" W X Y X Z ` ", +" ... "}; diff --git a/puppypackage/pybitmessage-0.3.4.pet.specs b/puppypackage/pybitmessage-0.3.4.pet.specs new file mode 100644 index 00000000..e346d0c9 --- /dev/null +++ b/puppypackage/pybitmessage-0.3.4.pet.specs @@ -0,0 +1 @@ +pybitmessage-0.3.4-1|PyBitmessage|0.3.4|1|Internet;mailnews;|5.1M||pybitmessage-0.3.4-1.pet|+openssl,+python-qt4,+sqlite3,+sqlite3-dev,+python-openssl,+python-sip|Send encrypted messages|ubuntu|precise|5| diff --git a/rpm.sh b/rpm.sh new file mode 100755 index 00000000..8269ed9c --- /dev/null +++ b/rpm.sh @@ -0,0 +1,53 @@ +#!/bin/bash + +APP=pybitmessage +PREV_VERSION=0.3.4 +VERSION=0.3.4 +RELEASE=1 +SOURCEDIR=. +ARCH_TYPE=`uname -m` +CURRDIR=`pwd` +SOURCE=~/rpmbuild/SOURCES/${APP}_${VERSION}.orig.tar.gz + + +# Update version numbers automatically - so you don't have to +sed -i 's/VERSION='${PREV_VERSION}'/VERSION='${VERSION}'/g' Makefile debian.sh arch.sh puppy.sh ebuild.sh slack.sh +sed -i 's/Version: '${PREV_VERSION}'/Version: '${VERSION}'/g' rpmpackage/${APP}.spec +sed -i 's/Release: '${RELEASE}'/Release: '${RELEASE}'/g' rpmpackage/${APP}.spec +sed -i 's/pkgrel='${RELEASE}'/pkgrel='${RELEASE}'/g' archpackage/PKGBUILD +sed -i 's/pkgver='${PREV_VERSION}'/pkgver='${VERSION}'/g' archpackage/PKGBUILD +sed -i "s/-${PREV_VERSION}-/-${VERSION}-/g" puppypackage/*.specs +sed -i "s/|${PREV_VERSION}|/|${VERSION}|/g" puppypackage/*.specs +sed -i 's/VERSION='${PREV_VERSION}'/VERSION='${VERSION}'/g' puppypackage/pinstall.sh puppypackage/puninstall.sh +sed -i 's/-'${PREV_VERSION}'.so/-'${VERSION}'.so/g' debian/*.links + +sudo yum groupinstall "Development Tools" +sudo yum install rpmdevtools + +# setup the rpmbuild directory tree +rpmdev-setuptree + +# create the source code in the SOURCES directory +make clean +mkdir -p ~/rpmbuild/SOURCES +rm -f ${SOURCE} + +# having the root directory called name-version seems essential +mv ../${APP} ../${APP}-${VERSION} +tar -cvzf ${SOURCE} ../${APP}-${VERSION} --exclude-vcs + +# rename the root directory without the version number +mv ../${APP}-${VERSION} ../${APP} + +# copy the spec file into the SPECS directory +cp -f rpmpackage/${APP}.spec ~/rpmbuild/SPECS + +# build +cd ~/rpmbuild/SPECS +rpmbuild -ba ${APP}.spec +cd ${CURRDIR} + +# Copy the results into the rpmpackage directory +mkdir -p rpmpackage/${ARCH_TYPE} +cp -r ~/rpmbuild/RPMS/${ARCH_TYPE}/${APP}* rpmpackage/${ARCH_TYPE} +cp -r ~/rpmbuild/SRPMS/${APP}* rpmpackage diff --git a/rpmpackage/pybitmessage.spec b/rpmpackage/pybitmessage.spec new file mode 100644 index 00000000..27485d73 --- /dev/null +++ b/rpmpackage/pybitmessage.spec @@ -0,0 +1,207 @@ +Name: pybitmessage +Version: 0.3.4 +Release: 1%{?dist} +Summary: Send encrypted messages +License: MIT +URL: https://github.com/Bitmessage/PyBitmessage +Packager: Bob Mottram (4096 bits) +Source0: http://yourdomainname.com/src/%{name}_%{version}.orig.tar.gz +Group: Office/Email + +Requires: python, PyQt4, openssl-compat-bitcoin-libs + + +%description +Bitmessage is a P2P communications protocol used to send encrypted messages +to another person or to many subscribers. It is decentralized and +trustless, meaning that you need-not inherently trust any entities like +root certificate authorities. It uses strong authentication which means +that the sender of a message cannot be spoofed, and it aims to hide +"non-content" data, like the sender and receiver of messages, from passive +eavesdroppers like those running warrantless wiretapping programs. + +%prep +%setup -q + +%build +%configure +make %{?_smp_mflags} + +%install +rm -rf %{buildroot} +mkdir -p %{buildroot} +mkdir -p %{buildroot}/etc +mkdir -p %{buildroot}/etc/%{name} +mkdir -p %{buildroot}/usr +mkdir -p %{buildroot}/usr/bin +mkdir -p %{buildroot}/usr/share +mkdir -p %{buildroot}/usr/share/man +mkdir -p %{buildroot}/usr/share/man/man1 +mkdir -p %{buildroot}/usr/share/%{name} +mkdir -p %{buildroot}/usr/share/applications +mkdir -p %{buildroot}/usr/share/icons +mkdir -p %{buildroot}/usr/share/icons/hicolor +mkdir -p %{buildroot}/usr/share/icons/hicolor/24x24 +mkdir -p %{buildroot}/usr/share/icons/hicolor/24x24/apps + +mkdir -p %{buildroot}/usr/share/pixmaps +mkdir -p %{buildroot}/usr/share/icons/hicolor/scalable +mkdir -p %{buildroot}/usr/share/icons/hicolor/scalable/apps +# Make install but to the RPM BUILDROOT directory +make install -B DESTDIR=%{buildroot} + +%files +%doc README.md LICENSE +%defattr(-,root,root,-) +%dir /usr/share/%{name} +%dir /usr/share/applications +%dir /usr/share/icons/hicolor +%dir /usr/share/icons/hicolor/24x24 +%dir /usr/share/icons/hicolor/24x24/apps +%dir /usr/share/pixmaps +%dir /usr/share/icons/hicolor/scalable +%dir /usr/share/icons/hicolor/scalable/apps +/usr/share/%{name}/* +%{_bindir}/* +%{_mandir}/man1/* +%attr(644,root,root) /usr/share/applications/%{name}.desktop +%attr(644,root,root) /usr/share/icons/hicolor/24x24/apps/%{name}.png + +%changelog +* Sun Jun 30 2013 Bob Mottram (4096 bits) - 0.3.4-1 +- Switched addr, msg, broadcast, and getpubkey message types + to 8 byte time. Last remaining type is pubkey. +- Added tooltips to show the full subject of messages +- Added Maximum Acceptable Difficulty fields in the settings +- Send out pubkey immediately after generating deterministic + addresses rather than waiting for a request + +* Sat Jun 29 2013 Bob Mottram (4096 bits) - 0.3.3-1 +- Remove inbox item from GUI when using API command trashMessage +- Add missing trailing semicolons to pybitmessage.desktop +- Ensure $(DESTDIR)/usr/bin exists +- Update Makefile to correct sandbox violations when built + via Portage (Gentoo) +- Fix message authentication bug + +* Fri Jun 28 2013 Bob Mottram (4096 bits) - 0.3.211-1 +- Removed multi-core proof of work + as the multiprocessing module does not work well with + pyinstaller's --onefile option. + +* Mon Jun 03 2013 Bob Mottram (4096 bits) - 0.3.2-1 +- Bugfix: Remove remaining references to the old myapp.trayIcon +- Refactored message status-related code. API function getStatus + now returns one of these strings: notfound, msgqueued, + broadcastqueued, broadcastsent, doingpubkeypow, awaitingpubkey, + doingmsgpow, msgsent, or ackreceived +- Moved proof of work to low-priority multi-threaded child + processes +- Added menu option to delete all trashed messages +- Added inv flooding attack mitigation +- On Linux, when selecting Show Bitmessage, do not maximize + automatically +- Store tray icons in bitmessage_icons_rc.py + +* Sat May 25 2013 Jonathan Warren (4096 bits) - 0.3.1-1 +- Added new API commands: getDeterministicAddress, + addSubscription, deleteSubscription +- TCP Connection timeout for non-fully-established connections + now 20 seconds +- Don't update the time we last communicated with a node unless + the connection is fully established. This will allow us to + forget about active but non-Bitmessage nodes which have made + it into our knownNodes file. +- Prevent incoming connection flooding from crashing + singleListener thread. Client will now only accept one + connection per remote node IP +- Bugfix: Worker thread crashed when doing a POW to send out + a v2 pubkey (bug introduced in 0.3.0) +- Wrap all sock.shutdown functions in error handlers +- Put all 'commit' commands within SQLLocks +- Bugfix: If address book label is blank, Bitmessage wouldn't + show message (bug introduced in 0.3.0) +- Messaging menu item selects the oldest unread message +- Standardize on 'Quit' rather than 'Exit' +- [OSX] Try to seek homebrew installation of OpenSSL +- Prevent multiple instances of the application from running +- Show 'Connected' or 'Connection Lost' indicators +- Use only 9 half-open connections on Windows but 32 for + everyone else +- Added appIndicator (a more functional tray icon) and Ubuntu + Messaging Menu integration +- Changed Debian install directory and run script name based + on Github issue #135 + +* Tue May 6 2013 Bob Mottram (4096 bits) - 0.3.0-1 +- Added new API function: getStatus +- Added error-handling around all sock.sendall() functions + in the receiveData thread so that if there is a problem + sending data, the threads will close gracefully +- Abandoned and removed the connectionsCount data structure; + use the connectedHostsList instead because it has proved to be + more accurate than trying to maintain the connectionsCount +- Added daemon mode. All UI code moved into a module and many + shared objects moved into shared.py +- Truncate display of very long messages to avoid freezing the UI +- Added encrypted broadcasts for v3 addresses or v2 addresses + after 2013-05-28 10:00 UTC +- No longer self.sock.close() from within receiveDataThreads, + let the sendDataThreads do it +- Swapped out the v2 announcements subscription address for a v3 + announcements subscription address +- Vacuum the messages.dat file once a month: will greatly reduce the file size +- Added a settings table in message.dat +- Implemented v3 addresses: + pubkey messages must now include two var_ints: nonce_trials_per_byte + and extra_bytes, and also be signed. When sending a message to a v3 + address, the sender must use these values in calculating its POW or + else the message will not be accepted by the receiver. +- Display a privacy warning when selecting 'Send Broadcast from this address' +- Added gitignore file +- Added code in preparation for a switch from 32-bit time to 64-bit time. + Nodes will now advertise themselves as using protocol version 2. +- Don't necessarily delete entries from the inventory after 2.5 days; + leave pubkeys there for 28 days so that we don't process the same ones + many times throughout a month. This was causing the 'pubkeys processed' + indicator on the 'Network Status' tab to not accurately reflect the + number of truly new addresses on the network. +- Use 32 threads for outgoing connections in order to connect quickly +- Fix typo when calling os.environ in the sys.platform=='darwin' case +- Allow the cancelling of a message which is in the process of being + sent by trashing it then restarting Bitmessage +- Bug fix: can't delete address from address book + +* Tue Apr 9 2013 Bob Mottram (4096 bits) - 0.2.8-1 +- Fixed Ubuntu & OS X issue: + Bitmessage wouldn't receive any objects from peers after restart. +- Inventory flush to disk when exiting program now vastly faster. +- Fixed address generation bug (kept Bitmessage from restarting). +- Improve deserialization of messages + before processing (a 'best practice'). +- Change to help Macs find OpenSSL the way Unix systems find it. +- Do not share or accept IPs which are in the private IP ranges. +- Added time-fuzzing + to the embedded time in pubkey and getpubkey messages. +- Added a knownNodes lock + to prevent an exception from sometimes occurring when saving + the data-structure to disk. +- Show unread messages in bold + and do not display new messages automatically. +- Support selecting multiple items + in the inbox, sent box, and address book. +- Use delete key to trash Inbox or Sent messages. +- Display richtext(HTML) messages + from senders in address book or subscriptions (although not + pseudo-mailing-lists; use new right-click option). +- Trim spaces + from the beginning and end of addresses when adding to + address book, subscriptions, and blacklist. +- Improved the display of the time for foreign language users. + +* Tue Apr 1 2013 Bob Mottram (4096 bits) - 0.2.7-1 +- Added debian packaging +- Script to generate debian packages +- SVG icon for Gnome shell, etc +- Source moved int src directory for debian standards compatibility +- Trailing carriage return on COPYING LICENSE and README.md diff --git a/slack.sh b/slack.sh new file mode 100755 index 00000000..cc71e1f3 --- /dev/null +++ b/slack.sh @@ -0,0 +1,48 @@ +#!/bin/bash + +APP=pybitmessage +PREV_VERSION=0.3.4 +VERSION=0.3.4 +RELEASE=1 +ARCH_TYPE=`uname -m` +BUILDDIR=~/slackbuild +CURRDIR=`pwd` +PROJECTDIR=${BUILDDIR}/${APP}-${VERSION}-${RELEASE} + +# Update version numbers automatically - so you don't have to +sed -i 's/VERSION='${PREV_VERSION}'/VERSION='${VERSION}'/g' Makefile debian.sh rpm.sh arch.sh puppy.sh ebuild.sh +sed -i 's/Version: '${PREV_VERSION}'/Version: '${VERSION}'/g' rpmpackage/${APP}.spec +sed -i 's/Release: '${RELEASE}'/Release: '${RELEASE}'/g' rpmpackage/${APP}.spec +sed -i 's/pkgrel='${RELEASE}'/pkgrel='${RELEASE}'/g' archpackage/PKGBUILD +sed -i 's/pkgver='${PREV_VERSION}'/pkgver='${VERSION}'/g' archpackage/PKGBUILD +sed -i "s/-${PREV_VERSION}-/-${VERSION}-/g" puppypackage/*.specs +sed -i "s/|${PREV_VERSION}|/|${VERSION}|/g" puppypackage/*.specs +sed -i 's/VERSION='${PREV_VERSION}'/VERSION='${VERSION}'/g' puppypackage/pinstall.sh puppypackage/puninstall.sh +sed -i 's/-'${PREV_VERSION}'.so/-'${VERSION}'.so/g' debian/*.links + + +# Make directories within which the project will be built +mkdir -p ${BUILDDIR} +mkdir -p ${PROJECTDIR} + +# Build the project +make clean +make +make install -B DESTDIR=${PROJECTDIR} + +# Copy the slack-desc and doinst.sh files into the build install directory +mkdir ${PROJECTDIR}/install +cp ${CURRDIR}/slackpackage/slack-desc ${PROJECTDIR}/install +cp ${CURRDIR}/slackpackage/doinst.sh ${PROJECTDIR}/install + +# Compress the build directory +cd ${BUILDDIR} +tar -c -f ${APP}-${VERSION}-${RELEASE}.tar . +sync +xz ${APP}-${VERSION}-${RELEASE}.tar +sync +mv ${APP}-${VERSION}-${RELEASE}.tar.xz ${CURRDIR}/slackpackage/${APP}-${VERSION}-${ARCH_TYPE}-${RELEASE}.txz +cd ${CURRDIR} + +# Remove the temporary build directory +rm -fr ${BUILDDIR} diff --git a/slackpackage/doinst.sh b/slackpackage/doinst.sh new file mode 100755 index 00000000..2d703395 --- /dev/null +++ b/slackpackage/doinst.sh @@ -0,0 +1,4 @@ +#!/bin/sh -e + +# This script is run after installation. +# Any additional configuration goes here. diff --git a/slackpackage/slack-desc b/slackpackage/slack-desc new file mode 100644 index 00000000..8705a13b --- /dev/null +++ b/slackpackage/slack-desc @@ -0,0 +1,19 @@ +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. Line +# up the first '|' above the ':' following the base package name, and the '|' on +# the right side marks the last column you can put a character in. You must make +# exactly 11 lines for the formatting to be correct. It's also customary to +# leave one space after the ':'. + + |-----handy-ruler--------------------------------------------------| +pybitmessage: pybitmessage (Send encrypted messages) +pybitmessage: +pybitmessage: Bitmessage is a P2P communications protocol used to send +pybitmessage: encrypted messages to another person or to many subscribers. It +pybitmessage: is decentralized and trustless, meaning that you need-not +pybitmessage: inherently trust any entities like root certificate authorities. +pybitmessage: It uses strong authentication which means that the sender of a +pybitmessage: message cannot be spoofed, and it aims to hide "non-content" +pybitmessage: data, like the sender and receiver of messages, from passive +pybitmessage: eavesdroppers like those running warrantless wiretapping +pybitmessage: programs. diff --git a/src/bitmessagemain.py b/src/bitmessagemain.py index e93fbd46..15acf545 100755 --- a/src/bitmessagemain.py +++ b/src/bitmessagemain.py @@ -14,7 +14,7 @@ try: from gevent import monkey monkey.patch_all() except ImportError as ex: - print "cannot find gevent" + print "Not using the gevent module as it was not found. No need to worry." import signal # Used to capture a Ctrl-C keypress so that Bitmessage can shutdown gracefully. # The next 3 are used for the API @@ -32,7 +32,6 @@ from class_singleListener import * from class_addressGenerator import * # Helper Functions -import helper_startup import helper_bootstrap import sys @@ -719,11 +718,8 @@ if __name__ == "__main__": signal.signal(signal.SIGINT, helper_generic.signal_handler) # signal.signal(signal.SIGINT, signal.SIG_DFL) - helper_startup.loadConfig() - helper_bootstrap.knownNodes() helper_bootstrap.dns() - # Start the address generation thread addressGeneratorThread = addressGenerator() addressGeneratorThread.daemon = True # close the main program even if there are threads left diff --git a/src/bitmessageqt/__init__.py b/src/bitmessageqt/__init__.py index f256d3ac..748f6954 100644 --- a/src/bitmessageqt/__init__.py +++ b/src/bitmessageqt/__init__.py @@ -30,6 +30,8 @@ import os from pyelliptic.openssl import OpenSSL import pickle import platform +import debug +from debug import logger try: from PyQt4 import QtCore, QtGui @@ -311,205 +313,10 @@ class MyForm(QtGui.QMainWindow): addressInKeysFile) # Load inbox from messages database file - font = QFont() - font.setBold(True) - shared.sqlLock.acquire() - shared.sqlSubmitQueue.put( - '''SELECT msgid, toaddress, fromaddress, subject, received, message, read FROM inbox where folder='inbox' ORDER BY received''') - shared.sqlSubmitQueue.put('') - queryreturn = shared.sqlReturnQueue.get() - shared.sqlLock.release() - for row in queryreturn: - msgid, toAddress, fromAddress, subject, received, message, read = row - subject = shared.fixPotentiallyInvalidUTF8Data(subject) - message = shared.fixPotentiallyInvalidUTF8Data(message) - try: - if toAddress == self.str_broadcast_subscribers: - toLabel = self.str_broadcast_subscribers - else: - toLabel = shared.config.get(toAddress, 'label') - except: - toLabel = '' - if toLabel == '': - toLabel = toAddress - - fromLabel = '' - t = (fromAddress,) - shared.sqlLock.acquire() - shared.sqlSubmitQueue.put( - '''select label from addressbook where address=?''') - shared.sqlSubmitQueue.put(t) - queryreturn = shared.sqlReturnQueue.get() - shared.sqlLock.release() - - if queryreturn != []: - for row in queryreturn: - fromLabel, = row - - if fromLabel == '': # If this address wasn't in our address book... - t = (fromAddress,) - shared.sqlLock.acquire() - shared.sqlSubmitQueue.put( - '''select label from subscriptions where address=?''') - shared.sqlSubmitQueue.put(t) - queryreturn = shared.sqlReturnQueue.get() - shared.sqlLock.release() - - if queryreturn != []: - for row in queryreturn: - fromLabel, = row - - self.ui.tableWidgetInbox.insertRow(0) - newItem = QtGui.QTableWidgetItem(unicode(toLabel, 'utf-8')) - newItem.setToolTip(unicode(toLabel, 'utf-8')) - newItem.setFlags( - QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled) - if not read: - newItem.setFont(font) - newItem.setData(Qt.UserRole, str(toAddress)) - if shared.safeConfigGetBoolean(toAddress, 'mailinglist'): - newItem.setTextColor(QtGui.QColor(137, 04, 177)) - self.ui.tableWidgetInbox.setItem(0, 0, newItem) - if fromLabel == '': - newItem = QtGui.QTableWidgetItem( - unicode(fromAddress, 'utf-8')) - newItem.setToolTip(unicode(fromAddress, 'utf-8')) - else: - newItem = QtGui.QTableWidgetItem(unicode(fromLabel, 'utf-8')) - newItem.setToolTip(unicode(fromLabel, 'utf-8')) - newItem.setFlags( - QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled) - if not read: - newItem.setFont(font) - newItem.setData(Qt.UserRole, str(fromAddress)) - - self.ui.tableWidgetInbox.setItem(0, 1, newItem) - newItem = QtGui.QTableWidgetItem(unicode(subject, 'utf-8')) - newItem.setToolTip(unicode(subject, 'utf-8')) - newItem.setData(Qt.UserRole, unicode(message, 'utf-8)')) - newItem.setFlags( - QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled) - if not read: - newItem.setFont(font) - self.ui.tableWidgetInbox.setItem(0, 2, newItem) - newItem = myTableWidgetItem(unicode(strftime(shared.config.get( - 'bitmessagesettings', 'timeformat'), localtime(int(received))), 'utf-8')) - newItem.setToolTip(unicode(strftime(shared.config.get( - 'bitmessagesettings', 'timeformat'), localtime(int(received))), 'utf-8')) - newItem.setData(Qt.UserRole, QByteArray(msgid)) - newItem.setData(33, int(received)) - newItem.setFlags( - QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled) - if not read: - newItem.setFont(font) - self.ui.tableWidgetInbox.setItem(0, 3, newItem) - self.ui.tableWidgetInbox.sortItems(3, Qt.DescendingOrder) - self.ui.tableWidgetInbox.keyPressEvent = self.tableWidgetInboxKeyPressEvent + self.loadInbox() # Load Sent items from database - shared.sqlLock.acquire() - shared.sqlSubmitQueue.put( - '''SELECT toaddress, fromaddress, subject, message, status, ackdata, lastactiontime FROM sent where folder = 'sent' ORDER BY lastactiontime''') - shared.sqlSubmitQueue.put('') - queryreturn = shared.sqlReturnQueue.get() - shared.sqlLock.release() - for row in queryreturn: - toAddress, fromAddress, subject, message, status, ackdata, lastactiontime = row - subject = shared.fixPotentiallyInvalidUTF8Data(subject) - message = shared.fixPotentiallyInvalidUTF8Data(message) - try: - fromLabel = shared.config.get(fromAddress, 'label') - except: - fromLabel = '' - if fromLabel == '': - fromLabel = fromAddress - - toLabel = '' - t = (toAddress,) - shared.sqlLock.acquire() - shared.sqlSubmitQueue.put( - '''select label from addressbook where address=?''') - shared.sqlSubmitQueue.put(t) - queryreturn = shared.sqlReturnQueue.get() - shared.sqlLock.release() - - if queryreturn != []: - for row in queryreturn: - toLabel, = row - - self.ui.tableWidgetSent.insertRow(0) - if toLabel == '': - newItem = QtGui.QTableWidgetItem(unicode(toAddress, 'utf-8')) - newItem.setToolTip(unicode(toAddress, 'utf-8')) - else: - newItem = QtGui.QTableWidgetItem(unicode(toLabel, 'utf-8')) - newItem.setToolTip(unicode(toLabel, 'utf-8')) - newItem.setData(Qt.UserRole, str(toAddress)) - newItem.setFlags( - QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled) - self.ui.tableWidgetSent.setItem(0, 0, newItem) - if fromLabel == '': - newItem = QtGui.QTableWidgetItem( - unicode(fromAddress, 'utf-8')) - newItem.setToolTip(unicode(fromAddress, 'utf-8')) - else: - newItem = QtGui.QTableWidgetItem(unicode(fromLabel, 'utf-8')) - newItem.setToolTip(unicode(fromLabel, 'utf-8')) - newItem.setData(Qt.UserRole, str(fromAddress)) - newItem.setFlags( - QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled) - self.ui.tableWidgetSent.setItem(0, 1, newItem) - newItem = QtGui.QTableWidgetItem(unicode(subject, 'utf-8')) - newItem.setToolTip(unicode(subject, 'utf-8')) - newItem.setData(Qt.UserRole, unicode(message, 'utf-8)')) - newItem.setFlags( - QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled) - self.ui.tableWidgetSent.setItem(0, 2, newItem) - if status == 'awaitingpubkey': - statusText = _translate( - "MainWindow", "Waiting on their encryption key. Will request it again soon.") - elif status == 'doingpowforpubkey': - statusText = _translate( - "MainWindow", "Encryption key request queued.") - elif status == 'msgqueued': - statusText = _translate( - "MainWindow", "Queued.") - elif status == 'msgsent': - statusText = _translate("MainWindow", "Message sent. Waiting on acknowledgement. Sent at %1").arg( - unicode(strftime(shared.config.get('bitmessagesettings', 'timeformat'), localtime(lastactiontime)),'utf-8')) - elif status == 'doingmsgpow': - statusText = _translate( - "MainWindow", "Need to do work to send message. Work is queued.") - elif status == 'ackreceived': - statusText = _translate("MainWindow", "Acknowledgement of the message received %1").arg( - unicode(strftime(shared.config.get('bitmessagesettings', 'timeformat'), localtime(lastactiontime)),'utf-8')) - elif status == 'broadcastqueued': - statusText = _translate( - "MainWindow", "Broadcast queued.") - elif status == 'broadcastsent': - statusText = _translate("MainWindow", "Broadcast on %1").arg(unicode(strftime( - shared.config.get('bitmessagesettings', 'timeformat'), localtime(lastactiontime)),'utf-8')) - elif status == 'toodifficult': - statusText = _translate("MainWindow", "Problem: The work demanded by the recipient is more difficult than you are willing to do. %1").arg( - unicode(strftime(shared.config.get('bitmessagesettings', 'timeformat'), localtime(lastactiontime)),'utf-8')) - elif status == 'badkey': - statusText = _translate("MainWindow", "Problem: The recipient\'s encryption key is no good. Could not encrypt message. %1").arg( - unicode(strftime(shared.config.get('bitmessagesettings', 'timeformat'), localtime(lastactiontime)),'utf-8')) - elif status == 'forcepow': - statusText = _translate( - "MainWindow", "Forced difficulty override. Send should start soon.") - else: - statusText = _translate("MainWindow", "Unknown status: %1 %2").arg(status).arg(unicode( - strftime(shared.config.get('bitmessagesettings', 'timeformat'), localtime(lastactiontime)),'utf-8')) - newItem = myTableWidgetItem(statusText) - newItem.setToolTip(statusText) - newItem.setData(Qt.UserRole, QByteArray(ackdata)) - newItem.setData(33, int(lastactiontime)) - newItem.setFlags( - QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled) - self.ui.tableWidgetSent.setItem(0, 3, newItem) - self.ui.tableWidgetSent.sortItems(3, Qt.DescendingOrder) - self.ui.tableWidgetSent.keyPressEvent = self.tableWidgetSentKeyPressEvent + self.loadSent() # Initialize the address book shared.sqlLock.acquire() @@ -530,6 +337,14 @@ class MyForm(QtGui.QMainWindow): # Initialize the Subscriptions self.rerenderSubscriptions() + # Initialize the inbox search + QtCore.QObject.connect(self.ui.inboxSearchLineEdit, QtCore.SIGNAL( + "returnPressed()"), self.inboxSearchLineEditPressed) + + # Initialize the sent search + QtCore.QObject.connect(self.ui.sentSearchLineEdit, QtCore.SIGNAL( + "returnPressed()"), self.sentSearchLineEditPressed) + # Initialize the Blacklist or Whitelist if shared.config.get('bitmessagesettings', 'blackwhitelist') == 'black': self.loadBlackWhiteList() @@ -689,6 +504,251 @@ class MyForm(QtGui.QMainWindow): self.appIndicatorShow() self.ui.tabWidget.setCurrentIndex(5) + # Load Sent items from database + def loadSent(self, where="", what=""): + what = "%" + what + "%" + if where == "To": + where = "toaddress" + elif where == "From": + where = "fromaddress" + elif where == "Subject": + where = "subject" + elif where == "Message": + where = "message" + else: + where = "toaddress || fromaddress || subject || message" + + sqlQuery = ''' + SELECT toaddress, fromaddress, subject, message, status, ackdata, lastactiontime + FROM sent WHERE folder="sent" AND %s LIKE ? + ORDER BY lastactiontime + ''' % (where,) + + while self.ui.tableWidgetSent.rowCount() > 0: + self.ui.tableWidgetSent.removeRow(0) + + t = (what,) + shared.sqlLock.acquire() + shared.sqlSubmitQueue.put(sqlQuery) + shared.sqlSubmitQueue.put(t) + queryreturn = shared.sqlReturnQueue.get() + shared.sqlLock.release() + for row in queryreturn: + toAddress, fromAddress, subject, message, status, ackdata, lastactiontime = row + subject = shared.fixPotentiallyInvalidUTF8Data(subject) + message = shared.fixPotentiallyInvalidUTF8Data(message) + try: + fromLabel = shared.config.get(fromAddress, 'label') + except: + fromLabel = '' + if fromLabel == '': + fromLabel = fromAddress + + toLabel = '' + t = (toAddress,) + shared.sqlLock.acquire() + shared.sqlSubmitQueue.put( + '''select label from addressbook where address=?''') + shared.sqlSubmitQueue.put(t) + queryreturn = shared.sqlReturnQueue.get() + shared.sqlLock.release() + + if queryreturn != []: + for row in queryreturn: + toLabel, = row + + self.ui.tableWidgetSent.insertRow(0) + if toLabel == '': + newItem = QtGui.QTableWidgetItem(unicode(toAddress, 'utf-8')) + newItem.setToolTip(unicode(toAddress, 'utf-8')) + else: + newItem = QtGui.QTableWidgetItem(unicode(toLabel, 'utf-8')) + newItem.setToolTip(unicode(toLabel, 'utf-8')) + newItem.setData(Qt.UserRole, str(toAddress)) + newItem.setFlags( + QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled) + self.ui.tableWidgetSent.setItem(0, 0, newItem) + if fromLabel == '': + newItem = QtGui.QTableWidgetItem( + unicode(fromAddress, 'utf-8')) + newItem.setToolTip(unicode(fromAddress, 'utf-8')) + else: + newItem = QtGui.QTableWidgetItem(unicode(fromLabel, 'utf-8')) + newItem.setToolTip(unicode(fromLabel, 'utf-8')) + newItem.setData(Qt.UserRole, str(fromAddress)) + newItem.setFlags( + QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled) + self.ui.tableWidgetSent.setItem(0, 1, newItem) + newItem = QtGui.QTableWidgetItem(unicode(subject, 'utf-8')) + newItem.setToolTip(unicode(subject, 'utf-8')) + newItem.setData(Qt.UserRole, unicode(message, 'utf-8)')) + newItem.setFlags( + QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled) + self.ui.tableWidgetSent.setItem(0, 2, newItem) + if status == 'awaitingpubkey': + statusText = _translate( + "MainWindow", "Waiting on their encryption key. Will request it again soon.") + elif status == 'doingpowforpubkey': + statusText = _translate( + "MainWindow", "Encryption key request queued.") + elif status == 'msgqueued': + statusText = _translate( + "MainWindow", "Queued.") + elif status == 'msgsent': + statusText = _translate("MainWindow", "Message sent. Waiting on acknowledgement. Sent at %1").arg( + unicode(strftime(shared.config.get('bitmessagesettings', 'timeformat'), localtime(lastactiontime)),'utf-8')) + elif status == 'doingmsgpow': + statusText = _translate( + "MainWindow", "Need to do work to send message. Work is queued.") + elif status == 'ackreceived': + statusText = _translate("MainWindow", "Acknowledgement of the message received %1").arg( + unicode(strftime(shared.config.get('bitmessagesettings', 'timeformat'), localtime(lastactiontime)),'utf-8')) + elif status == 'broadcastqueued': + statusText = _translate( + "MainWindow", "Broadcast queued.") + elif status == 'broadcastsent': + statusText = _translate("MainWindow", "Broadcast on %1").arg(unicode(strftime( + shared.config.get('bitmessagesettings', 'timeformat'), localtime(lastactiontime)),'utf-8')) + elif status == 'toodifficult': + statusText = _translate("MainWindow", "Problem: The work demanded by the recipient is more difficult than you are willing to do. %1").arg( + unicode(strftime(shared.config.get('bitmessagesettings', 'timeformat'), localtime(lastactiontime)),'utf-8')) + elif status == 'badkey': + statusText = _translate("MainWindow", "Problem: The recipient\'s encryption key is no good. Could not encrypt message. %1").arg( + unicode(strftime(shared.config.get('bitmessagesettings', 'timeformat'), localtime(lastactiontime)),'utf-8')) + elif status == 'forcepow': + statusText = _translate( + "MainWindow", "Forced difficulty override. Send should start soon.") + else: + statusText = _translate("MainWindow", "Unknown status: %1 %2").arg(status).arg(unicode( + strftime(shared.config.get('bitmessagesettings', 'timeformat'), localtime(lastactiontime)),'utf-8')) + newItem = myTableWidgetItem(statusText) + newItem.setToolTip(statusText) + newItem.setData(Qt.UserRole, QByteArray(ackdata)) + newItem.setData(33, int(lastactiontime)) + newItem.setFlags( + QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled) + self.ui.tableWidgetSent.setItem(0, 3, newItem) + self.ui.tableWidgetSent.sortItems(3, Qt.DescendingOrder) + self.ui.tableWidgetSent.keyPressEvent = self.tableWidgetSentKeyPressEvent + + # Load inbox from messages database file + def loadInbox(self, where="", what=""): + what = "%" + what + "%" + if where == "To": + where = "toaddress" + elif where == "From": + where = "fromaddress" + elif where == "Subject": + where = "subject" + elif where == "Message": + where = "message" + else: + where = "toaddress || fromaddress || subject || message" + + sqlQuery = ''' + SELECT msgid, toaddress, fromaddress, subject, received, message, read + FROM inbox WHERE folder="inbox" AND %s LIKE ? + ORDER BY received + ''' % (where,) + + while self.ui.tableWidgetInbox.rowCount() > 0: + self.ui.tableWidgetInbox.removeRow(0) + + font = QFont() + font.setBold(True) + t = (what,) + shared.sqlLock.acquire() + shared.sqlSubmitQueue.put(sqlQuery) + shared.sqlSubmitQueue.put(t) + queryreturn = shared.sqlReturnQueue.get() + shared.sqlLock.release() + for row in queryreturn: + msgid, toAddress, fromAddress, subject, received, message, read = row + subject = shared.fixPotentiallyInvalidUTF8Data(subject) + message = shared.fixPotentiallyInvalidUTF8Data(message) + try: + if toAddress == self.str_broadcast_subscribers: + toLabel = self.str_broadcast_subscribers + else: + toLabel = shared.config.get(toAddress, 'label') + except: + toLabel = '' + if toLabel == '': + toLabel = toAddress + + fromLabel = '' + t = (fromAddress,) + shared.sqlLock.acquire() + shared.sqlSubmitQueue.put( + '''select label from addressbook where address=?''') + shared.sqlSubmitQueue.put(t) + queryreturn = shared.sqlReturnQueue.get() + shared.sqlLock.release() + + if queryreturn != []: + for row in queryreturn: + fromLabel, = row + + if fromLabel == '': # If this address wasn't in our address book... + t = (fromAddress,) + shared.sqlLock.acquire() + shared.sqlSubmitQueue.put( + '''select label from subscriptions where address=?''') + shared.sqlSubmitQueue.put(t) + queryreturn = shared.sqlReturnQueue.get() + shared.sqlLock.release() + + if queryreturn != []: + for row in queryreturn: + fromLabel, = row + + self.ui.tableWidgetInbox.insertRow(0) + newItem = QtGui.QTableWidgetItem(unicode(toLabel, 'utf-8')) + newItem.setToolTip(unicode(toLabel, 'utf-8')) + newItem.setFlags( + QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled) + if not read: + newItem.setFont(font) + newItem.setData(Qt.UserRole, str(toAddress)) + if shared.safeConfigGetBoolean(toAddress, 'mailinglist'): + newItem.setTextColor(QtGui.QColor(137, 04, 177)) + self.ui.tableWidgetInbox.setItem(0, 0, newItem) + if fromLabel == '': + newItem = QtGui.QTableWidgetItem( + unicode(fromAddress, 'utf-8')) + newItem.setToolTip(unicode(fromAddress, 'utf-8')) + else: + newItem = QtGui.QTableWidgetItem(unicode(fromLabel, 'utf-8')) + newItem.setToolTip(unicode(fromLabel, 'utf-8')) + newItem.setFlags( + QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled) + if not read: + newItem.setFont(font) + newItem.setData(Qt.UserRole, str(fromAddress)) + + self.ui.tableWidgetInbox.setItem(0, 1, newItem) + newItem = QtGui.QTableWidgetItem(unicode(subject, 'utf-8')) + newItem.setToolTip(unicode(subject, 'utf-8')) + newItem.setData(Qt.UserRole, unicode(message, 'utf-8)')) + newItem.setFlags( + QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled) + if not read: + newItem.setFont(font) + self.ui.tableWidgetInbox.setItem(0, 2, newItem) + newItem = myTableWidgetItem(unicode(strftime(shared.config.get( + 'bitmessagesettings', 'timeformat'), localtime(int(received))), 'utf-8')) + newItem.setToolTip(unicode(strftime(shared.config.get( + 'bitmessagesettings', 'timeformat'), localtime(int(received))), 'utf-8')) + newItem.setData(Qt.UserRole, QByteArray(msgid)) + newItem.setData(33, int(received)) + newItem.setFlags( + QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled) + if not read: + newItem.setFont(font) + self.ui.tableWidgetInbox.setItem(0, 3, newItem) + self.ui.tableWidgetInbox.sortItems(3, Qt.DescendingOrder) + self.ui.tableWidgetInbox.keyPressEvent = self.tableWidgetInboxKeyPressEvent + # create application indicator def appIndicatorInit(self, app): self.tray = QSystemTrayIcon(QtGui.QIcon( @@ -1778,6 +1838,8 @@ class MyForm(QtGui.QMainWindow): self.settingsDialogInstance.ui.lineEditSocksUsername.text())) shared.config.set('bitmessagesettings', 'sockspassword', str( self.settingsDialogInstance.ui.lineEditSocksPassword.text())) + shared.config.set('bitmessagesettings', 'sockslisten', str( + self.settingsDialogInstance.ui.checkBoxSocksListen.isChecked())) shared.config.set('bitmessagesettings', 'namecoinrpctype', self.settingsDialogInstance.getNamecoinType()) @@ -1842,7 +1904,14 @@ class MyForm(QtGui.QMainWindow): shared.knownNodesLock.release() os.remove(shared.appdata + 'keys.dat') os.remove(shared.appdata + 'knownnodes.dat') + previousAppdataLocation = shared.appdata shared.appdata = '' + debug.restartLoggingInUpdatedAppdataLocation() + try: + os.remove(previousAppdataLocation + 'debug.log') + os.remove(previousAppdataLocation + 'debug.log.1') + except: + pass if shared.appdata == '' and not self.settingsDialogInstance.ui.checkBoxPortableMode.isChecked(): # If we ARE using portable mode now but the user selected that we shouldn't... shared.appdata = shared.lookupAppdataFolder() @@ -1862,6 +1931,12 @@ class MyForm(QtGui.QMainWindow): shared.knownNodesLock.release() os.remove('keys.dat') os.remove('knownnodes.dat') + debug.restartLoggingInUpdatedAppdataLocation() + try: + os.remove('debug.log') + os.remove('debug.log.1') + except: + pass def click_radioButtonBlacklist(self): if shared.config.get('bitmessagesettings', 'blackwhitelist') == 'white': @@ -2533,6 +2608,20 @@ class MyForm(QtGui.QMainWindow): self.popMenuSent.addAction(self.actionForceSend) self.popMenuSent.exec_(self.ui.tableWidgetSent.mapToGlobal(point)) + def inboxSearchLineEditPressed(self): + searchKeyword = self.ui.inboxSearchLineEdit.text().toUtf8().data() + searchOption = self.ui.inboxSearchOptionCB.currentText().toUtf8().data() + self.ui.inboxSearchLineEdit.setText(QString("")) + self.ui.textEditInboxMessage.setPlainText(QString("")) + self.loadInbox(searchOption, searchKeyword) + + def sentSearchLineEditPressed(self): + searchKeyword = self.ui.sentSearchLineEdit.text().toUtf8().data() + searchOption = self.ui.sentSearchOptionCB.currentText().toUtf8().data() + self.ui.sentSearchLineEdit.setText(QString("")) + self.ui.textEditInboxMessage.setPlainText(QString("")) + self.loadSent(searchOption, searchKeyword) + def tableWidgetInboxItemClicked(self): currentRow = self.ui.tableWidgetInbox.currentRow() if currentRow >= 0: @@ -2717,6 +2806,8 @@ class settingsDialog(QtGui.QDialog): shared.config.get('bitmessagesettings', 'port'))) self.ui.checkBoxAuthentication.setChecked(shared.config.getboolean( 'bitmessagesettings', 'socksauthentication')) + self.ui.checkBoxSocksListen.setChecked(shared.config.getboolean( + 'bitmessagesettings', 'sockslisten')) if str(shared.config.get('bitmessagesettings', 'socksproxytype')) == 'none': self.ui.comboBoxProxyType.setCurrentIndex(0) self.ui.lineEditSocksHostname.setEnabled(False) @@ -2724,6 +2815,7 @@ class settingsDialog(QtGui.QDialog): self.ui.lineEditSocksUsername.setEnabled(False) self.ui.lineEditSocksPassword.setEnabled(False) self.ui.checkBoxAuthentication.setEnabled(False) + self.ui.checkBoxSocksListen.setEnabled(False) elif str(shared.config.get('bitmessagesettings', 'socksproxytype')) == 'SOCKS4a': self.ui.comboBoxProxyType.setCurrentIndex(1) self.ui.lineEditTCPPort.setEnabled(False) @@ -2811,11 +2903,13 @@ class settingsDialog(QtGui.QDialog): self.ui.lineEditSocksUsername.setEnabled(False) self.ui.lineEditSocksPassword.setEnabled(False) self.ui.checkBoxAuthentication.setEnabled(False) + self.ui.checkBoxSocksListen.setEnabled(False) self.ui.lineEditTCPPort.setEnabled(True) elif comboBoxIndex == 1 or comboBoxIndex == 2: self.ui.lineEditSocksHostname.setEnabled(True) self.ui.lineEditSocksPort.setEnabled(True) self.ui.checkBoxAuthentication.setEnabled(True) + self.ui.checkBoxSocksListen.setEnabled(True) if self.ui.checkBoxAuthentication.isChecked(): self.ui.lineEditSocksUsername.setEnabled(True) self.ui.lineEditSocksPassword.setEnabled(True) diff --git a/src/bitmessageqt/bitmessage_icons.qrc b/src/bitmessageqt/bitmessage_icons.qrc index a186b01b..bdd3fd07 100644 --- a/src/bitmessageqt/bitmessage_icons.qrc +++ b/src/bitmessageqt/bitmessage_icons.qrc @@ -1,20 +1,20 @@ - images/can-icon-24px-yellow.png - images/can-icon-24px-red.png - images/can-icon-24px-green.png - images/can-icon-24px.png - images/can-icon-16px.png - images/greenicon.png - images/redicon.png - images/yellowicon.png - images/addressbook.png - images/blacklist.png - images/identities.png - images/networkstatus.png - images/sent.png - images/subscriptions.png - images/send.png - images/inbox.png + ../images/can-icon-24px-yellow.png + ../images/can-icon-24px-red.png + ../images/can-icon-24px-green.png + ../images/can-icon-24px.png + ../images/can-icon-16px.png + ../images/greenicon.png + ../images/redicon.png + ../images/yellowicon.png + ../images/addressbook.png + ../images/blacklist.png + ../images/identities.png + ../images/networkstatus.png + ../images/sent.png + ../images/subscriptions.png + ../images/send.png + ../images/inbox.png diff --git a/src/bitmessageqt/bitmessageui.py b/src/bitmessageqt/bitmessageui.py index e4ff59d8..bcf310bb 100644 --- a/src/bitmessageqt/bitmessageui.py +++ b/src/bitmessageqt/bitmessageui.py @@ -2,7 +2,7 @@ # Form implementation generated from reading ui file 'bitmessageui.ui' # -# Created: Thu Jul 4 22:00:02 2013 +# Created: Wed Jul 17 18:15:14 2013 # by: PyQt4 UI code generator 4.9.3 # # WARNING! All changes made in this file will be lost! @@ -45,6 +45,21 @@ class Ui_MainWindow(object): self.inbox.setObjectName(_fromUtf8("inbox")) self.verticalLayout_2 = QtGui.QVBoxLayout(self.inbox) self.verticalLayout_2.setObjectName(_fromUtf8("verticalLayout_2")) + self.horizontalLayoutSearch = QtGui.QHBoxLayout() + self.horizontalLayoutSearch.setContentsMargins(-1, 0, -1, -1) + self.horizontalLayoutSearch.setObjectName(_fromUtf8("horizontalLayoutSearch")) + self.inboxSearchLineEdit = QtGui.QLineEdit(self.inbox) + self.inboxSearchLineEdit.setObjectName(_fromUtf8("inboxSearchLineEdit")) + self.horizontalLayoutSearch.addWidget(self.inboxSearchLineEdit) + self.inboxSearchOptionCB = QtGui.QComboBox(self.inbox) + self.inboxSearchOptionCB.setObjectName(_fromUtf8("inboxSearchOptionCB")) + self.inboxSearchOptionCB.addItem(_fromUtf8("")) + self.inboxSearchOptionCB.addItem(_fromUtf8("")) + self.inboxSearchOptionCB.addItem(_fromUtf8("")) + self.inboxSearchOptionCB.addItem(_fromUtf8("")) + self.inboxSearchOptionCB.addItem(_fromUtf8("")) + self.horizontalLayoutSearch.addWidget(self.inboxSearchOptionCB) + self.verticalLayout_2.addLayout(self.horizontalLayoutSearch) self.tableWidgetInbox = QtGui.QTableWidget(self.inbox) self.tableWidgetInbox.setAlternatingRowColors(True) self.tableWidgetInbox.setSelectionMode(QtGui.QAbstractItemView.ExtendedSelection) @@ -154,6 +169,21 @@ class Ui_MainWindow(object): self.sent.setObjectName(_fromUtf8("sent")) self.verticalLayout = QtGui.QVBoxLayout(self.sent) self.verticalLayout.setObjectName(_fromUtf8("verticalLayout")) + self.horizontalLayout = QtGui.QHBoxLayout() + self.horizontalLayout.setContentsMargins(-1, 0, -1, -1) + self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout")) + self.sentSearchLineEdit = QtGui.QLineEdit(self.sent) + self.sentSearchLineEdit.setObjectName(_fromUtf8("sentSearchLineEdit")) + self.horizontalLayout.addWidget(self.sentSearchLineEdit) + self.sentSearchOptionCB = QtGui.QComboBox(self.sent) + self.sentSearchOptionCB.setObjectName(_fromUtf8("sentSearchOptionCB")) + self.sentSearchOptionCB.addItem(_fromUtf8("")) + self.sentSearchOptionCB.addItem(_fromUtf8("")) + self.sentSearchOptionCB.addItem(_fromUtf8("")) + self.sentSearchOptionCB.addItem(_fromUtf8("")) + self.sentSearchOptionCB.addItem(_fromUtf8("")) + self.horizontalLayout.addWidget(self.sentSearchOptionCB) + self.verticalLayout.addLayout(self.horizontalLayout) self.tableWidgetSent = QtGui.QTableWidget(self.sent) self.tableWidgetSent.setDragDropMode(QtGui.QAbstractItemView.DragDrop) self.tableWidgetSent.setAlternatingRowColors(True) @@ -464,6 +494,12 @@ class Ui_MainWindow(object): def retranslateUi(self, MainWindow): MainWindow.setWindowTitle(QtGui.QApplication.translate("MainWindow", "Bitmessage", None, QtGui.QApplication.UnicodeUTF8)) + self.inboxSearchLineEdit.setPlaceholderText(QtGui.QApplication.translate("MainWindow", "Search", None, QtGui.QApplication.UnicodeUTF8)) + self.inboxSearchOptionCB.setItemText(0, QtGui.QApplication.translate("MainWindow", "All", None, QtGui.QApplication.UnicodeUTF8)) + self.inboxSearchOptionCB.setItemText(1, QtGui.QApplication.translate("MainWindow", "To", None, QtGui.QApplication.UnicodeUTF8)) + self.inboxSearchOptionCB.setItemText(2, QtGui.QApplication.translate("MainWindow", "From", None, QtGui.QApplication.UnicodeUTF8)) + self.inboxSearchOptionCB.setItemText(3, QtGui.QApplication.translate("MainWindow", "Subject", None, QtGui.QApplication.UnicodeUTF8)) + self.inboxSearchOptionCB.setItemText(4, QtGui.QApplication.translate("MainWindow", "Message", None, QtGui.QApplication.UnicodeUTF8)) self.tableWidgetInbox.setSortingEnabled(True) item = self.tableWidgetInbox.horizontalHeaderItem(0) item.setText(QtGui.QApplication.translate("MainWindow", "To", None, QtGui.QApplication.UnicodeUTF8)) @@ -490,6 +526,12 @@ class Ui_MainWindow(object): self.pushButtonSend.setText(QtGui.QApplication.translate("MainWindow", "Send", None, QtGui.QApplication.UnicodeUTF8)) self.labelSendBroadcastWarning.setText(QtGui.QApplication.translate("MainWindow", "Be aware that broadcasts are only encrypted with your address. Anyone who knows your address can read them.", None, QtGui.QApplication.UnicodeUTF8)) self.tabWidget.setTabText(self.tabWidget.indexOf(self.send), QtGui.QApplication.translate("MainWindow", "Send", None, QtGui.QApplication.UnicodeUTF8)) + self.sentSearchLineEdit.setPlaceholderText(QtGui.QApplication.translate("MainWindow", "Search", None, QtGui.QApplication.UnicodeUTF8)) + self.sentSearchOptionCB.setItemText(0, QtGui.QApplication.translate("MainWindow", "All", None, QtGui.QApplication.UnicodeUTF8)) + self.sentSearchOptionCB.setItemText(1, QtGui.QApplication.translate("MainWindow", "To", None, QtGui.QApplication.UnicodeUTF8)) + self.sentSearchOptionCB.setItemText(2, QtGui.QApplication.translate("MainWindow", "From", None, QtGui.QApplication.UnicodeUTF8)) + self.sentSearchOptionCB.setItemText(3, QtGui.QApplication.translate("MainWindow", "Subject", None, QtGui.QApplication.UnicodeUTF8)) + self.sentSearchOptionCB.setItemText(4, QtGui.QApplication.translate("MainWindow", "Message", None, QtGui.QApplication.UnicodeUTF8)) self.tableWidgetSent.setSortingEnabled(True) item = self.tableWidgetSent.horizontalHeaderItem(0) item.setText(QtGui.QApplication.translate("MainWindow", "To", None, QtGui.QApplication.UnicodeUTF8)) diff --git a/src/bitmessageqt/bitmessageui.ui b/src/bitmessageqt/bitmessageui.ui index e1964592..04cc3d9b 100644 --- a/src/bitmessageqt/bitmessageui.ui +++ b/src/bitmessageqt/bitmessageui.ui @@ -14,7 +14,7 @@ Bitmessage - + :/newPrefix/images/can-icon-24px.png:/newPrefix/images/can-icon-24px.png @@ -61,13 +61,56 @@ - + :/newPrefix/images/inbox.png:/newPrefix/images/inbox.png Inbox + + + + 0 + + + + + Search + + + + + + + + All + + + + + To + + + + + From + + + + + Subject + + + + + Message + + + + + + @@ -145,7 +188,7 @@ - + :/newPrefix/images/send.png:/newPrefix/images/send.png @@ -315,13 +358,56 @@ p, li { white-space: pre-wrap; } - + :/newPrefix/images/sent.png:/newPrefix/images/sent.png Sent + + + + 0 + + + + + Search + + + + + + + + All + + + + + To + + + + + From + + + + + Subject + + + + + Message + + + + + + @@ -392,7 +478,7 @@ p, li { white-space: pre-wrap; } - + :/newPrefix/images/identities.png:/newPrefix/images/identities.png @@ -492,7 +578,7 @@ p, li { white-space: pre-wrap; } - + :/newPrefix/images/subscriptions.png:/newPrefix/images/subscriptions.png @@ -577,7 +663,7 @@ p, li { white-space: pre-wrap; } - + :/newPrefix/images/addressbook.png:/newPrefix/images/addressbook.png @@ -659,7 +745,7 @@ p, li { white-space: pre-wrap; } - + :/newPrefix/images/blacklist.png:/newPrefix/images/blacklist.png @@ -751,7 +837,7 @@ p, li { white-space: pre-wrap; } - + :/newPrefix/images/networkstatus.png:/newPrefix/images/networkstatus.png @@ -770,7 +856,7 @@ p, li { white-space: pre-wrap; } - + :/newPrefix/images/redicon.png:/newPrefix/images/redicon.png diff --git a/src/bitmessageqt/settings.py b/src/bitmessageqt/settings.py index 3bb185a3..f791d1b0 100644 --- a/src/bitmessageqt/settings.py +++ b/src/bitmessageqt/settings.py @@ -2,7 +2,7 @@ # Form implementation generated from reading ui file 'settings.ui' # -# Created: Sun Jul 7 19:23:55 2013 +# Created: Wed Jul 17 18:15:35 2013 # by: PyQt4 UI code generator 4.9.3 # # WARNING! All changes made in this file will be lost! @@ -122,6 +122,9 @@ class Ui_settingsDialog(object): self.lineEditSocksPassword.setEchoMode(QtGui.QLineEdit.Password) self.lineEditSocksPassword.setObjectName(_fromUtf8("lineEditSocksPassword")) self.gridLayout_2.addWidget(self.lineEditSocksPassword, 2, 5, 1, 1) + self.checkBoxSocksListen = QtGui.QCheckBox(self.groupBox_2) + self.checkBoxSocksListen.setObjectName(_fromUtf8("checkBoxSocksListen")) + self.gridLayout_2.addWidget(self.checkBoxSocksListen, 3, 1, 1, 4) self.gridLayout_4.addWidget(self.groupBox_2, 1, 0, 1, 1) spacerItem2 = QtGui.QSpacerItem(20, 70, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding) self.gridLayout_4.addItem(spacerItem2, 2, 0, 1, 1) @@ -304,7 +307,8 @@ class Ui_settingsDialog(object): settingsDialog.setTabOrder(self.lineEditSocksPort, self.checkBoxAuthentication) settingsDialog.setTabOrder(self.checkBoxAuthentication, self.lineEditSocksUsername) settingsDialog.setTabOrder(self.lineEditSocksUsername, self.lineEditSocksPassword) - settingsDialog.setTabOrder(self.lineEditSocksPassword, self.buttonBox) + settingsDialog.setTabOrder(self.lineEditSocksPassword, self.checkBoxSocksListen) + settingsDialog.setTabOrder(self.checkBoxSocksListen, self.buttonBox) def retranslateUi(self, settingsDialog): settingsDialog.setWindowTitle(QtGui.QApplication.translate("settingsDialog", "Settings", None, QtGui.QApplication.UnicodeUTF8)) @@ -327,6 +331,7 @@ class Ui_settingsDialog(object): self.checkBoxAuthentication.setText(QtGui.QApplication.translate("settingsDialog", "Authentication", None, QtGui.QApplication.UnicodeUTF8)) self.label_5.setText(QtGui.QApplication.translate("settingsDialog", "Username:", None, QtGui.QApplication.UnicodeUTF8)) self.label_6.setText(QtGui.QApplication.translate("settingsDialog", "Pass:", None, QtGui.QApplication.UnicodeUTF8)) + self.checkBoxSocksListen.setText(QtGui.QApplication.translate("settingsDialog", "Listen for incoming connections when using proxy", None, QtGui.QApplication.UnicodeUTF8)) self.tabWidgetSettings.setTabText(self.tabWidgetSettings.indexOf(self.tabNetworkSettings), QtGui.QApplication.translate("settingsDialog", "Network Settings", None, QtGui.QApplication.UnicodeUTF8)) self.label_8.setText(QtGui.QApplication.translate("settingsDialog", "When someone sends you a message, their computer must first complete some work. The difficulty of this work, by default, is 1. You may raise this default for new addresses you create by changing the values here. Any new addresses you create will require senders to meet the higher difficulty. There is one exception: if you add a friend or acquaintance to your address book, Bitmessage will automatically notify them when you next send a message that they need only complete the minimum amount of work: difficulty 1. ", None, QtGui.QApplication.UnicodeUTF8)) self.label_9.setText(QtGui.QApplication.translate("settingsDialog", "Total difficulty:", None, QtGui.QApplication.UnicodeUTF8)) diff --git a/src/bitmessageqt/settings.ui b/src/bitmessageqt/settings.ui index f8674928..6c79f313 100644 --- a/src/bitmessageqt/settings.ui +++ b/src/bitmessageqt/settings.ui @@ -247,6 +247,13 @@ + + + + Listen for incoming connections when using proxy + + + @@ -691,6 +698,7 @@ checkBoxAuthentication lineEditSocksUsername lineEditSocksPassword + checkBoxSocksListen buttonBox diff --git a/src/class_receiveDataThread.py b/src/class_receiveDataThread.py index ad5e7b34..e73f3d2b 100644 --- a/src/class_receiveDataThread.py +++ b/src/class_receiveDataThread.py @@ -528,13 +528,7 @@ class receiveDataThread(threading.Thread): print 'fromAddress:', fromAddress if messageEncodingType == 2: - bodyPositionIndex = string.find(message, '\nBody:') - if bodyPositionIndex > 1: - subject = message[8:bodyPositionIndex] - body = message[bodyPositionIndex + 6:] - else: - subject = '' - body = message + subject, body = self.decodeType2Message(message) elif messageEncodingType == 1: body = message subject = '' @@ -684,13 +678,7 @@ class receiveDataThread(threading.Thread): print 'fromAddress:', fromAddress if messageEncodingType == 2: - bodyPositionIndex = string.find(message, '\nBody:') - if bodyPositionIndex > 1: - subject = message[8:bodyPositionIndex] - body = message[bodyPositionIndex + 6:] - else: - subject = '' - body = message + subject, body = self.decodeType2Message(message) elif messageEncodingType == 1: body = message subject = '' @@ -1005,15 +993,7 @@ class receiveDataThread(threading.Thread): toLabel = toAddress if messageEncodingType == 2: - bodyPositionIndex = string.find(message, '\nBody:') - if bodyPositionIndex > 1: - subject = message[8:bodyPositionIndex] - subject = subject[ - :500] # Only save and show the first 500 characters of the subject. Any more is probably an attak. - body = message[bodyPositionIndex + 6:] - else: - subject = '' - body = message + subject, body = self.decodeType2Message(message) elif messageEncodingType == 1: body = message subject = '' @@ -1086,6 +1066,21 @@ class receiveDataThread(threading.Thread): print 'Time to decrypt this message successfully:', timeRequiredToAttemptToDecryptMessage print 'Average time for all message decryption successes since startup:', sum / len(shared.successfullyDecryptMessageTimings) + def decodeType2Message(self, message): + bodyPositionIndex = string.find(message, '\nBody:') + if bodyPositionIndex > 1: + subject = message[8:bodyPositionIndex] + # Only save and show the first 500 characters of the subject. + # Any more is probably an attack. + subject = subject[:500] + body = message[bodyPositionIndex + 6:] + else: + subject = '' + body = message + # Throw away any extra lines (headers) after the subject. + if subject: + subject = subject.splitlines()[0] + return subject, body def isAckDataValid(self, ackData): if len(ackData) < 24: diff --git a/src/class_singleListener.py b/src/class_singleListener.py index 58bddf6f..d6b46643 100644 --- a/src/class_singleListener.py +++ b/src/class_singleListener.py @@ -21,10 +21,11 @@ class singleListener(threading.Thread): self.selfInitiatedConnections = selfInitiatedConnections def run(self): - # We don't want to accept incoming connections if the user is using a - # SOCKS proxy. If they eventually select proxy 'none' then this will - # start listening for connections. - while shared.config.get('bitmessagesettings', 'socksproxytype')[0:5] == 'SOCKS': + # We typically don't want to accept incoming connections if the user is using a + # SOCKS proxy, unless they have configured otherwise. If they eventually select + # proxy 'none' or configure SOCKS listening then this will start listening for + # connections. + while shared.config.get('bitmessagesettings', 'socksproxytype')[0:5] == 'SOCKS' and not shared.config.getboolean('bitmessagesettings', 'sockslisten'): time.sleep(300) with shared.printLock: @@ -40,10 +41,11 @@ class singleListener(threading.Thread): sock.listen(2) while True: - # We don't want to accept incoming connections if the user is using - # a SOCKS proxy. If the user eventually select proxy 'none' then - # this will start listening for connections. - while shared.config.get('bitmessagesettings', 'socksproxytype')[0:5] == 'SOCKS': + # We typically don't want to accept incoming connections if the user is using a + # SOCKS proxy, unless they have configured otherwise. If they eventually select + # proxy 'none' or configure SOCKS listening then this will start listening for + # connections. + while shared.config.get('bitmessagesettings', 'socksproxytype')[0:5] == 'SOCKS' and not shared.config.getboolean('bitmessagesettings', 'sockslisten'): time.sleep(10) while len(shared.connectedHostsList) > 220: with shared.printLock: diff --git a/src/class_singleWorker.py b/src/class_singleWorker.py index 1a0fe149..56b7be6e 100644 --- a/src/class_singleWorker.py +++ b/src/class_singleWorker.py @@ -414,10 +414,10 @@ class singleWorker(threading.Thread): # Update the status of the message in the 'sent' table to have # a 'broadcastsent' status shared.sqlLock.acquire() - t = ('broadcastsent', int( + t = (inventoryHash,'broadcastsent', int( time.time()), fromaddress, subject, body, 'broadcastqueued') shared.sqlSubmitQueue.put( - 'UPDATE sent SET status=?, lastactiontime=? WHERE fromaddress=? AND subject=? AND message=? AND status=?') + 'UPDATE sent SET msgid=?, status=?, lastactiontime=? WHERE fromaddress=? AND subject=? AND message=? AND status=?') shared.sqlSubmitQueue.put(t) queryreturn = shared.sqlReturnQueue.get() shared.sqlSubmitQueue.put('commit') @@ -774,8 +774,8 @@ class singleWorker(threading.Thread): # Update the status of the message in the 'sent' table to have a # 'msgsent' status shared.sqlLock.acquire() - t = (ackdata,) - shared.sqlSubmitQueue.put('''UPDATE sent SET status='msgsent' WHERE ackdata=?''') + t = (inventoryHash,ackdata,) + shared.sqlSubmitQueue.put('''UPDATE sent SET msgid=?, status='msgsent' WHERE ackdata=?''') shared.sqlSubmitQueue.put(t) queryreturn = shared.sqlReturnQueue.get() shared.sqlSubmitQueue.put('commit') diff --git a/src/class_sqlThread.py b/src/class_sqlThread.py index 84014a8c..f1a428d2 100644 --- a/src/class_sqlThread.py +++ b/src/class_sqlThread.py @@ -5,6 +5,7 @@ import time import shutil # used for moving the messages.dat file import sys import os +from debug import logger # This thread exists because SQLITE3 is so un-threadsafe that we must # submit queries to it and it puts results back in a different queue. They @@ -80,6 +81,7 @@ class sqlThread(threading.Thread): shared.config.set('bitmessagesettings', 'socksauthentication', 'false') shared.config.set('bitmessagesettings', 'socksusername', '') shared.config.set('bitmessagesettings', 'sockspassword', '') + shared.config.set('bitmessagesettings', 'sockslisten', 'false') shared.config.set('bitmessagesettings', 'keysencrypted', 'false') shared.config.set('bitmessagesettings', 'messagesencrypted', 'false') with open(shared.appdata + 'keys.dat', 'wb') as configfile: diff --git a/src/debug.py b/src/debug.py index d8033f2d..fe7815e7 100644 --- a/src/debug.py +++ b/src/debug.py @@ -18,48 +18,64 @@ Use: `from debug import logger` to import this facility into whatever module you ''' import logging import logging.config +import shared # TODO(xj9): Get from a config file. log_level = 'DEBUG' -logging.config.dictConfig({ - 'version': 1, - 'formatters': { - 'default': { - 'format': '%(asctime)s - %(levelname)s - %(message)s', +def configureLogging(): + logging.config.dictConfig({ + 'version': 1, + 'formatters': { + 'default': { + 'format': '%(asctime)s - %(levelname)s - %(message)s', + }, }, - }, - 'handlers': { - 'console': { - 'class': 'logging.StreamHandler', - 'formatter': 'default', - 'level': log_level, - 'stream': 'ext://sys.stdout' + 'handlers': { + 'console': { + 'class': 'logging.StreamHandler', + 'formatter': 'default', + 'level': log_level, + 'stream': 'ext://sys.stdout' + }, + 'file': { + 'class': 'logging.handlers.RotatingFileHandler', + 'formatter': 'default', + 'level': log_level, + 'filename': shared.appdata + 'debug.log', + 'maxBytes': 2097152, # 2 MiB + 'backupCount': 1, + } }, - 'file': { - 'class': 'logging.handlers.RotatingFileHandler', - 'formatter': 'default', + 'loggers': { + 'console_only': { + 'handlers': ['console'], + 'propagate' : 0 + }, + 'file_only': { + 'handlers': ['file'], + 'propagate' : 0 + }, + 'both': { + 'handlers': ['console', 'file'], + 'propagate' : 0 + }, + }, + 'root': { 'level': log_level, - 'filename': 'bm.log', - 'maxBytes': 1024, - 'backupCount': 0, - } - }, - 'loggers': { - 'console_only': { 'handlers': ['console'], }, - 'file_only': { - 'handlers': ['file'], - }, - 'both': { - 'handlers': ['console', 'file'], - }, - }, - 'root': { - 'level': log_level, - 'handlers': ['console'], - }, -}) + }) # TODO (xj9): Get from a config file. -logger = logging.getLogger('console_only') +#logger = logging.getLogger('console_only') +configureLogging() +logger = logging.getLogger('both') + +def restartLoggingInUpdatedAppdataLocation(): + global logger + for i in list(logger.handlers): + logger.removeHandler(i) + i.flush() + i.close() + configureLogging() + logger = logging.getLogger('both') \ No newline at end of file diff --git a/src/helper_bootstrap.py b/src/helper_bootstrap.py index 296dda6b..c3d5c1fd 100644 --- a/src/helper_bootstrap.py +++ b/src/helper_bootstrap.py @@ -33,7 +33,7 @@ def dns(): print 'Adding', item[4][0], 'to knownNodes based on DNS boostrap method' shared.knownNodes[1][item[4][0]] = (8080, int(time.time())) except: - print 'bootstrap8080.bitmessage.org DNS bootstraping failed.' + print 'bootstrap8080.bitmessage.org DNS bootstrapping failed.' try: for item in socket.getaddrinfo('bootstrap8444.bitmessage.org', 80): print 'Adding', item[4][0], 'to knownNodes based on DNS boostrap method' diff --git a/src/helper_startup.py b/src/helper_startup.py index e3df91d6..86395be6 100644 --- a/src/helper_startup.py +++ b/src/helper_startup.py @@ -52,6 +52,8 @@ def loadConfig(): shared.config.set('bitmessagesettings', 'socksport', '9050') shared.config.set( 'bitmessagesettings', 'socksauthentication', 'false') + shared.config.set( + 'bitmessagesettings', 'sockslisten', 'false') shared.config.set('bitmessagesettings', 'socksusername', '') shared.config.set('bitmessagesettings', 'sockspassword', '') shared.config.set('bitmessagesettings', 'keysencrypted', 'false') @@ -77,5 +79,13 @@ def loadConfig(): print 'Creating new config files in', shared.appdata if not os.path.exists(shared.appdata): os.makedirs(shared.appdata) + if not sys.platform.startswith('win'): + os.umask(0o077) with open(shared.appdata + 'keys.dat', 'wb') as configfile: shared.config.write(configfile) + + # Initialize settings that may be missing due to upgrades and could + # cause errors if missing. + if not shared.config.has_option('bitmessagesettings', 'sockslisten'): + shared.config.set('bitmessagesettings', 'sockslisten', 'false') + diff --git a/src/shared.py b/src/shared.py index 4b3ef73b..557b332d 100644 --- a/src/shared.py +++ b/src/shared.py @@ -8,19 +8,25 @@ maximumAgeOfNodesThatIAdvertiseToOthers = 10800 # Equals three hours useVeryEasyProofOfWorkForTesting = False # If you set this to True while on the normal network, you won't be able to send or sometimes receive messages. -import threading +# Libraries. +import ConfigParser +import os +import pickle +import Queue +import random +import socket import sys +import stat +import threading +import time + +# Project imports. from addresses import * import highlevelcrypto -import Queue -import pickle -import os -import time -import ConfigParser -import socket -import random -import highlevelcrypto import shared +import helper_startup + + config = ConfigParser.SafeConfigParser() myECCryptorObjects = {} @@ -62,8 +68,6 @@ ackdataForWhichImWatching = {} networkDefaultProofOfWorkNonceTrialsPerByte = 320 #The amount of work that should be performed (and demanded) per byte of the payload. Double this number to double the work. networkDefaultPayloadLengthExtraBytes = 14000 #To make sending short messages a little more difficult, this value is added to the payload length for use in calculating the proof of work target. - - def isInSqlInventory(hash): t = (hash,) shared.sqlLock.acquire() @@ -118,7 +122,11 @@ def lookupAppdataFolder(): if "HOME" in environ: dataFolder = path.join(os.environ["HOME"], "Library/Application Support/", APPNAME) + '/' else: - print 'Could not find home folder, please report this message and your OS X version to the BitMessage Github.' + stringToLog = 'Could not find home folder, please report this message and your OS X version to the BitMessage Github.' + if 'logger' in globals(): + logger.critical(stringToLog) + else: + print stringToLog sys.exit() elif 'win32' in sys.platform or 'win64' in sys.platform: @@ -129,13 +137,19 @@ def lookupAppdataFolder(): dataFolder = path.join(environ["XDG_CONFIG_HOME"], APPNAME) except KeyError: dataFolder = path.join(environ["HOME"], ".config", APPNAME) + # Migrate existing data to the proper location if this is an existing install try: - print "Moving data folder to ~/.config/%s" % APPNAME move(path.join(environ["HOME"], ".%s" % APPNAME), dataFolder) - dataFolder = dataFolder + '/' + stringToLog = "Moving data folder to %s" % (dataFolder) + if 'logger' in globals(): + logger.info(stringToLog) + else: + print stringToLog except IOError: - dataFolder = dataFolder + '/' + # Old directory may not exist. + pass + dataFolder = dataFolder + '/' return dataFolder def isAddressInMyAddressBook(address): @@ -179,51 +193,63 @@ def isAddressInMyAddressBookSubscriptionsListOrWhitelist(address): return False def safeConfigGetBoolean(section,field): - try: - return config.getboolean(section,field) - except: - return False + try: + return config.getboolean(section,field) + except: + return False def decodeWalletImportFormat(WIFstring): fullString = arithmetic.changebase(WIFstring,58,256) privkey = fullString[:-4] if fullString[-4:] != hashlib.sha256(hashlib.sha256(privkey).digest()).digest()[:4]: - sys.stderr.write('Major problem! When trying to decode one of your private keys, the checksum failed. Here is the PRIVATE key: %s\n' % str(WIFstring)) + logger.error('Major problem! When trying to decode one of your private keys, the checksum ' + 'failed. Here is the PRIVATE key: %s\n' % str(WIFstring)) return "" else: #checksum passed if privkey[0] == '\x80': return privkey[1:] else: - sys.stderr.write('Major problem! When trying to decode one of your private keys, the checksum passed but the key doesn\'t begin with hex 80. Here is the PRIVATE key: %s\n' % str(WIFstring)) + logger.error('Major problem! When trying to decode one of your private keys, the ' + 'checksum passed but the key doesn\'t begin with hex 80. Here is the ' + 'PRIVATE key: %s\n' % str(WIFstring)) return "" def reloadMyAddressHashes(): - printLock.acquire() - print 'reloading keys from keys.dat file' - printLock.release() + logger.debug('reloading keys from keys.dat file') myECCryptorObjects.clear() myAddressesByHash.clear() #myPrivateKeys.clear() + + keyfileSecure = checkSensitiveFilePermissions(appdata + 'keys.dat') configSections = config.sections() + hasEnabledKeys = False for addressInKeysFile in configSections: if addressInKeysFile <> 'bitmessagesettings': isEnabled = config.getboolean(addressInKeysFile, 'enabled') if isEnabled: + hasEnabledKeys = True status,addressVersionNumber,streamNumber,hash = decodeAddress(addressInKeysFile) if addressVersionNumber == 2 or addressVersionNumber == 3: - privEncryptionKey = decodeWalletImportFormat(config.get(addressInKeysFile, 'privencryptionkey')).encode('hex') #returns a simple 32 bytes of information encoded in 64 Hex characters, or null if there was an error + # Returns a simple 32 bytes of information encoded in 64 Hex characters, + # or null if there was an error. + privEncryptionKey = decodeWalletImportFormat( + config.get(addressInKeysFile, 'privencryptionkey')).encode('hex') + if len(privEncryptionKey) == 64:#It is 32 bytes encoded as 64 hex characters myECCryptorObjects[hash] = highlevelcrypto.makeCryptor(privEncryptionKey) myAddressesByHash[hash] = addressInKeysFile + else: - sys.stderr.write('Error in reloadMyAddressHashes: Can\'t handle address versions other than 2 or 3.\n') + logger.error('Error in reloadMyAddressHashes: Can\'t handle address ' + 'versions other than 2 or 3.\n') + + if not keyfileSecure: + fixSensitiveFilePermissions(appdata + 'keys.dat', hasEnabledKeys) def reloadBroadcastSendersForWhichImWatching(): - printLock.acquire() - print 'reloading subscriptions...' - printLock.release() + logger.debug('reloading subscriptions...') broadcastSendersForWhichImWatching.clear() MyECSubscriptionCryptorObjects.clear() sqlLock.acquire() @@ -246,46 +272,45 @@ def doCleanShutdown(): knownNodesLock.acquire() UISignalQueue.put(('updateStatusBar','Saving the knownNodes list of peers to disk...')) output = open(appdata + 'knownnodes.dat', 'wb') - print 'finished opening knownnodes.dat. Now pickle.dump' + logger.info('finished opening knownnodes.dat. Now pickle.dump') pickle.dump(knownNodes, output) - print 'Completed pickle.dump. Closing output...' + logger.info('Completed pickle.dump. Closing output...') output.close() knownNodesLock.release() - printLock.acquire() - print 'Finished closing knownnodes.dat output file.' - printLock.release() + logger.info('Finished closing knownnodes.dat output file.') UISignalQueue.put(('updateStatusBar','Done saving the knownNodes list of peers to disk.')) broadcastToSendDataQueues((0, 'shutdown', 'all')) - printLock.acquire() - print 'Flushing inventory in memory out to disk...' - printLock.release() - UISignalQueue.put(('updateStatusBar','Flushing inventory in memory out to disk. This should normally only take a second...')) + logger.info('Flushing inventory in memory out to disk...') + UISignalQueue.put(( + 'updateStatusBar', + 'Flushing inventory in memory out to disk. This should normally only take a second...')) flushInventory() - #This one last useless query will guarantee that the previous flush committed before we close the program. + # This one last useless query will guarantee that the previous flush committed before we close + # the program. sqlLock.acquire() sqlSubmitQueue.put('SELECT address FROM subscriptions') sqlSubmitQueue.put('') sqlReturnQueue.get() sqlSubmitQueue.put('exit') sqlLock.release() - printLock.acquire() - print 'Finished flushing inventory.' - printLock.release() + logger.info('Finished flushing inventory.') - time.sleep(.25) #Wait long enough to guarantee that any running proof of work worker threads will check the shutdown variable and exit. If the main thread closes before they do then they won't stop. + # Wait long enough to guarantee that any running proof of work worker threads will check the + # shutdown variable and exit. If the main thread closes before they do then they won't stop. + time.sleep(.25) if safeConfigGetBoolean('bitmessagesettings','daemon'): - printLock.acquire() - print 'Done.' - printLock.release() + logger.info('Clean shutdown complete.') os._exit(0) -#When you want to command a sendDataThread to do something, like shutdown or send some data, this function puts your data into the queues for each of the sendDataThreads. The sendDataThreads are responsible for putting their queue into (and out of) the sendDataQueues list. +# When you want to command a sendDataThread to do something, like shutdown or send some data, this +# function puts your data into the queues for each of the sendDataThreads. The sendDataThreads are +# responsible for putting their queue into (and out of) the sendDataQueues list. def broadcastToSendDataQueues(data): - #print 'running broadcastToSendDataQueues' + # logger.debug('running broadcastToSendDataQueues') for q in sendDataQueues: q.put((data)) @@ -309,3 +334,41 @@ def fixPotentiallyInvalidUTF8Data(text): except: output = 'Part of the message is corrupt. The message cannot be displayed the normal way.\n\n' + repr(text) return output + +# Checks sensitive file permissions for inappropriate umask during keys.dat creation. +# (Or unwise subsequent chmod.) +# +# Returns true iff file appears to have appropriate permissions. +def checkSensitiveFilePermissions(filename): + if sys.platform == 'win32': + # TODO: This might deserve extra checks by someone familiar with + # Windows systems. + return True + else: + present_permissions = os.stat(filename)[0] + disallowed_permissions = stat.S_IRWXG | stat.S_IRWXO + return present_permissions & disallowed_permissions == 0 + +# Fixes permissions on a sensitive file. +def fixSensitiveFilePermissions(filename, hasEnabledKeys): + if hasEnabledKeys: + logger.warning('Keyfile had insecure permissions, and there were enabled keys. ' + 'The truly paranoid should stop using them immediately.') + else: + logger.warning('Keyfile had insecure permissions, but there were no enabled keys.') + try: + present_permissions = os.stat(filename)[0] + disallowed_permissions = stat.S_IRWXG | stat.S_IRWXO + allowed_permissions = ((1<<32)-1) ^ disallowed_permissions + new_permissions = ( + allowed_permissions & present_permissions) + os.chmod(filename, new_permissions) + + logger.info('Keyfile permissions automatically fixed.') + + except Exception, e: + logger.exception('Keyfile permissions could not be fixed.') + raise + +helper_startup.loadConfig() +from debug import logger \ No newline at end of file diff --git a/src/translations/bitmessage_ru_RU.pro b/src/translations/bitmessage_ru_RU.pro new file mode 100644 index 00000000..71cac3ae --- /dev/null +++ b/src/translations/bitmessage_ru_RU.pro @@ -0,0 +1,30 @@ +SOURCES += ../addresses.py +SOURCES += ../bitmessagemain.py +SOURCES += ../class_addressGenerator.py +SOURCES += ../class_outgoingSynSender.py +SOURCES += ../class_receiveDataThread.py +SOURCES += ../class_sendDataThread.py +SOURCES += ../class_singleCleaner.py +SOURCES += ../class_singleListener.py +SOURCES += ../class_singleWorker.py +SOURCES += ../class_sqlThread.py +SOURCES += ../helper_bitcoin.py +SOURCES += ../helper_bootstrap.py +SOURCES += ../helper_generic.py +SOURCES += ../helper_inbox.py +SOURCES += ../helper_sent.py +SOURCES += ../helper_startup.py +SOURCES += ../shared.py +SOURCES += ../bitmessageqt/__init__.py +SOURCES += ../bitmessageqt/about.py +SOURCES += ../bitmessageqt/bitmessageui.py +SOURCES += ../bitmessageqt/help.py +SOURCES += ../bitmessageqt/iconglossary.py +SOURCES += ../bitmessageqt/newaddressdialog.py +SOURCES += ../bitmessageqt/newchandialog.py +SOURCES += ../bitmessageqt/newsubscriptiondialog.py +SOURCES += ../bitmessageqt/regenerateaddresses.py +SOURCES += ../bitmessageqt/settings.py +SOURCES += ../bitmessageqt/specialaddressbehavior.py + +TRANSLATIONS = bitmessage_ru_RU.ts diff --git a/src/translations/bitmessage_ru_RU.qm b/src/translations/bitmessage_ru_RU.qm new file mode 100644 index 00000000..e917c3b0 Binary files /dev/null and b/src/translations/bitmessage_ru_RU.qm differ diff --git a/src/translations/bitmessage_ru_RU.ts b/src/translations/bitmessage_ru_RU.ts new file mode 100644 index 00000000..e6337bf0 --- /dev/null +++ b/src/translations/bitmessage_ru_RU.ts @@ -0,0 +1,1260 @@ + + + + + MainWindow + + + One of your addresses, %1, is an old version 1 address. Version 1 addresses are no longer supported. May we delete it now? + Один из Ваших адресов, %1, является устаревшим адресом версии 1. Адреса версии 1 больше не поддерживаются. Хотите ли Вы удалить его сейчас? + + + + Reply + Ответить + + + + Add sender to your Address Book + Добавить отправителя в адресную книгу + + + + Move to Trash + Поместить в корзину + + + + View HTML code as formatted text + Просмотреть HTML код как отформатированный текст + + + + Save message as... + Сохранить сообщение как ... + + + + New + Новый адрес + + + + Enable + Включить + + + + Disable + Выключить + + + + Copy address to clipboard + Скопировать адрес в буфер обмена + + + + Special address behavior... + Особое поведение адресов... + + + + Send message to this address + Отправить сообщение на этот адрес + + + + Subscribe to this address + Подписаться на рассылку с этого адреса + + + + Add New Address + Добавить новый адрес + + + + Delete + Удалить + + + + Copy destination address to clipboard + Скопировать адрес отправки в буфер обмена + + + + Force send + Форсировать отправку + + + + Add new entry + Добавить новую запись + + + + Waiting on their encryption key. Will request it again soon. + Ожидаем ключ шифрования от Вашего собеседника. Запрос будет повторен через некоторое время. + + + + Encryption key request queued. + Запрос ключа шифрования поставлен в очередь. + + + + Queued. + В очереди. + + + + Message sent. Waiting on acknowledgement. Sent at %1 + Сообщение отправлено. Ожидаем подтверждения. Отправлено в %1 + + + + Need to do work to send message. Work is queued. + Нужно провести требуемые вычисления, чтобы отправить сообщение. Вычисления ожидают очереди. + + + + Acknowledgement of the message received %1 + Сообщение получено %1 + + + + Broadcast queued. + Рассылка ожидает очереди. + + + + Broadcast on %1 + Рассылка на %1 + + + + Problem: The work demanded by the recipient is more difficult than you are willing to do. %1 + Проблема: Ваш получатель требует более сложных вычислений, чем максимум, указанный в Ваших настройках. %1 + + + + Problem: The recipient's encryption key is no good. Could not encrypt message. %1 + Проблема: ключ получателя неправильный. Невозможно зашифровать сообщение. %1 + + + + Forced difficulty override. Send should start soon. + Форсирована смена сложности. Отправляем через некоторое время. + + + + Unknown status: %1 %2 + Неизвестный статус: %1 %2 + + + + Since startup on %1 + С начала работы %1 + + + + Not Connected + Не соединено + + + + Show Bitmessage + Показать Bitmessage + + + + Send + Отправка + + + + Subscribe + Подписки + + + + Address Book + Адресная книга + + + + Quit + Выйти + + + + You may manage your keys by editing the keys.dat file stored in the same directory as this program. It is important that you back up this file. + Вы можете управлять Вашими ключами, отредактировав файл keys.dat, находящийся в той же папке, что и эта программа. +Создайте резервную копию этого файла перед тем как будете его редактировать. + + + + You may manage your keys by editing the keys.dat file stored in + %1 +It is important that you back up this file. + Вы можете управлять Вашими ключами, отредактировав файл keys.dat, находящийся в + %1 +Создайте резервную копию этого файла перед тем как будете его редактировать. + + + + Open keys.dat? + Открыть файл keys.dat? + + + + You may manage your keys by editing the keys.dat file stored in the same directory as this program. It is important that you back up this file. Would you like to open the file now? (Be sure to close Bitmessage before making any changes.) + Вы можете управлять Вашими ключами, отредактировав файл keys.dat, находящийся в той же папке, что и эта программа. +Создайте резервную копию этого файла перед тем как будете его редактировать. Хотели бы Вы открыть этот файл сейчас? +(пожалуйста, закройте Bitmessage до того как Вы внесете в этот файл какие-либо изменения.) + + + + You may manage your keys by editing the keys.dat file stored in + %1 +It is important that you back up this file. Would you like to open the file now? (Be sure to close Bitmessage before making any changes.) + Вы можете управлять Вашими ключами, отредактировав файл keys.dat, находящийся в + %1 +Создайте резервную копию этого файла перед тем как будете его редактировать. Хотели бы Вы открыть этот файл сейчас? +(пожалуйста, закройте Bitmessage до того как Вы внесете в этот файл какие-либо изменения.) + + + + Delete trash? + Очистить корзину? + + + + Are you sure you want to delete all trashed messages? + Вы уверены, что хотите очистить корзину? + + + + bad passphrase + Неподходящая секретная фраза + + + + You must type your passphrase. If you don't have one then this is not the form for you. + Вы должны ввести секретную фразу. Если Вы не хотите это делать, то Вы выбрали неправильную опцию. + + + + Processed %1 person-to-person messages. + Обработано %1 сообщений. + + + + Processed %1 broadcast messages. + Обработано %1 рассылок. + + + + Processed %1 public keys. + Обработано %1 открытых ключей. + + + + Total Connections: %1 + Всего соединений: %1 + + + + Connection lost + Соединение потеряно + + + + Connected + Соединено + + + + Message trashed + Сообщение удалено + + + + Error: Bitmessage addresses start with BM- Please check %1 + Ошибка: Bitmessage адреса начинаются с BM- Пожалуйста, проверьте %1 + + + + Error: The address %1 is not typed or copied correctly. Please check it. + Ошибка: адрес %1 внесен или скопирован неправильно. Пожалуйста, перепроверьте. + + + + Error: The address %1 contains invalid characters. Please check it. + Ошибка: адрес %1 содержит запрещенные символы. Пожалуйста, перепроверьте. + + + + Error: The address version in %1 is too high. Either you need to upgrade your Bitmessage software or your acquaintance is being clever. + Ошибка: версия адреса в %1 слишком новая. Либо Вам нужно обновить Bitmessage, либо Ваш собеседник дал неправильный адрес. + + + + Error: Some data encoded in the address %1 is too short. There might be something wrong with the software of your acquaintance. + Ошибка: некоторые данные, закодированные в адресе %1, слишком короткие. Возможно, что-то не так с программой Вашего собеседника. + + + + Error: Some data encoded in the address %1 is too long. There might be something wrong with the software of your acquaintance. + Ошибка: некоторые данные, закодированные в адресе %1, слишком длинные. Возможно, что-то не так с программой Вашего собеседника. + + + + Error: Something is wrong with the address %1. + Ошибка: что-то не так с адресом %1. + + + + Error: You must specify a From address. If you don't have one, go to the 'Your Identities' tab. + Вы должны указать адрес в поле "От кого". Вы можете найти Ваш адрес во вкладе "Ваши Адреса". + + + + Sending to your address + Отправка на Ваш собственный адрес + + + + Error: One of the addresses to which you are sending a message, %1, is yours. Unfortunately the Bitmessage client cannot process its own messages. Please try running a second client on a different computer or within a VM. + Ошибка: Один из адресов, на который Вы отправляете сообщение, %1, принадлежит Вам. К сожалению, Bitmessage не может отправлять сообщения самому себе. Попробуйте запустить второго клиента на другом компьютере или на виртуальной машине. + + + + Address version number + Версия адреса + + + + Concerning the address %1, Bitmessage cannot understand address version numbers of %2. Perhaps upgrade Bitmessage to the latest version. + По поводу адреса %1: Bitmessage не поддерживаем адреса версии %2. Возможно, Вам нужно обновить клиент Bitmessage. + + + + Stream number + Номер потока + + + + Concerning the address %1, Bitmessage cannot handle stream numbers of %2. Perhaps upgrade Bitmessage to the latest version. + По поводу адреса %1: Bitmessage не поддерживаем стрим номер %2. Возможно, Вам нужно обновить клиент Bitmessage. + + + + Warning: You are currently not connected. Bitmessage will do the work necessary to send the message but it won't send until you connect. + Внимание: Вы не подключены к сети. Bitmessage проделает необходимые вычисления, чтобы отправить сообщение, но не отправит его до тех пор, пока Вы не подсоединитесь к сети. + + + + Your 'To' field is empty. + Вы не заполнили поле 'Кому'. + + + + Work is queued. + Вычисления поставлены в очередь. + + + + Right click one or more entries in your address book and select 'Send message to this address'. + Нажмите правую кнопку мышки на каком-либо адресе и выберите "Отправить сообщение на этот адрес". + + + + Work is queued. %1 + Вычисления поставлены в очередь. %1 + + + + New Message + Новое сообщение + + + + From + От + + + + Address is valid. + Адрес введен правильно. + + + + Error: You cannot add the same address to your address book twice. Try renaming the existing one if you want. + Ошибка: Вы не можете добавлять один и тот же адрес в Адресную Книгу несколько раз. Просто переименуйте существующий адрес. + + + + The address you entered was invalid. Ignoring it. + Вы ввели неправильный адрес. Это адрес проигнорирован. + + + + Error: You cannot add the same address to your subsciptions twice. Perhaps rename the existing one if you want. + Ошибка: Вы не можете добавлять один и тот же адрес в подписку несколько раз. Просто переименуйте существующую подписку. + + + + Restart + Перезапустить + + + + You must restart Bitmessage for the port number change to take effect. + Вы должны перезапустить Bitmessage, чтобы смена номера порта имела эффект. + + + + Bitmessage will use your proxy from now on but you may want to manually restart Bitmessage now to close existing connections. + Bitmessage будет использовать Ваш прокси в дальнейшем, тем не менее, мы рекомендуем перезапустить Bitmessage в ручную, чтобы закрыть уже существующие соединения. + + + + Error: You cannot add the same address to your list twice. Perhaps rename the existing one if you want. + Ошибка: Вы не можете добавлять один и тот же адрес в список несколько раз. Просто переименуйте существующий адрес. + + + + Passphrase mismatch + Секретная фраза не подходит + + + + The passphrase you entered twice doesn't match. Try again. + Вы ввели две разные секретные фразы. Пожалуйста, повторите заново. + + + + Choose a passphrase + Придумайте секретную фразу + + + + You really do need a passphrase. + Вы действительно должны ввести секретную фразу. + + + + All done. Closing user interface... + Программа завершена. Закрываем пользовательский интерфейс... + + + + Address is gone + Адрес утерян + + + + Bitmessage cannot find your address %1. Perhaps you removed it? + Bitmessage не может найти Ваш адрес %1. Возможно Вы удалили его? + + + + Address disabled + Адрес выключен + + + + Error: The address from which you are trying to send is disabled. You'll have to enable it on the 'Your Identities' tab before using it. + Ошибка: адрес, с которого Вы пытаетесь отправить, выключен. Вам нужно будет включить этот адрес во вкладке "Ваши адреса". + + + + Entry added to the Address Book. Edit the label to your liking. + Запись добавлена в Адресную Книгу. Вы можете ее отредактировать. + + + + Moved items to trash. There is no user interface to view your trash, but it is still on disk if you are desperate to get it back. + Удалено в корзину. Чтобы попасть в корзину, Вам нужно будет найти файл корзины на диске. + + + + Save As... + Сохранить как ... + + + + Write error. + Ошибка записи. + + + + No addresses selected. + Вы не выбрали адрес. + + + + Options have been disabled because they either aren't applicable or because they haven't yet been implemented for your operating system. + Опции были отключены, потому что ли они либо не подходят, либо еще не выполнены под Вашу операционную систему. + + + + The address should start with ''BM-'' + Адрес должен начинаться с "BM-" + + + + The address is not typed or copied correctly (the checksum failed). + Адрес введен или скопирован неверно (контрольная сумма не сходится). + + + + The version number of this address is higher than this software can support. Please upgrade Bitmessage. + Версия этого адреса более поздняя, чем Ваша программа. Пожалуйста, обновите программу Bitmessage. + + + + The address contains invalid characters. + Адрес содержит запрещенные символы. + + + + Some data encoded in the address is too short. + Данные, закодированные в адресе, слишком короткие. + + + + Some data encoded in the address is too long. + Данные, закодированные в адресе, слишком длинные. + + + + You are using TCP port %1. (This can be changed in the settings). + Вы используете TCP порт %1 (Его можно поменять в настройках). + + + + Bitmessage + Bitmessage + + + + To + Кому + + + + From + От кого + + + + Subject + Тема + + + + Received + Получено + + + + Inbox + Входящие + + + + Load from Address book + Взять из адресной книги + + + + Message: + Сообщение: + + + + Subject: + Тема: + + + + Send to one or more specific people + Отправить одному или нескольким указанным получателям + + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:9pt; font-weight:400; font-style:normal;"> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p></body></html> + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:9pt; font-weight:400; font-style:normal;"> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p></body></html> + + + + To: + Кому: + + + + From: + От: + + + + Broadcast to everyone who is subscribed to your address + Рассылка всем, кто подписался на Ваш адрес + + + + Be aware that broadcasts are only encrypted with your address. Anyone who knows your address can read them. + Пожалуйста, учитывайте, что рассылки шифруются лишь Вашим адресом. Любой человек, который знает Ваш адрес, сможет прочитать Вашу рассылку. + + + + Status + Статус + + + + Sent + Отправленные + + + + Label (not shown to anyone) + Название (не показывается никому) + + + + Address + Адрес + + + + Stream + Поток + + + + Your Identities + Ваши Адреса + + + + Here you can subscribe to 'broadcast messages' that are sent by other users. Messages will appear in your Inbox. Addresses here override those on the Blacklist tab. + Здесь Вы можете подписаться на рассылки от других пользователей. Все рассылки будут появляться у Вас во Входящих. Вы будете следить за всеми адресами, указанными здесь, даже если они в черном списке. + + + + Add new Subscription + Добавить новую подписку + + + + Label + Название + + + + Subscriptions + Подписки + + + + The Address book is useful for adding names or labels to other people's Bitmessage addresses so that you can recognize them more easily in your inbox. You can add entries here using the 'Add' button, or from your inbox by right-clicking on a message. + Адресная книга удобна для присвоения осмысленных имен Bitmessage адресам Ваших друзей. Вы можете добавлять новые записи с помощью кнопки "Добавить новую запись", или же правым кликом мышки на сообщении. + + + + Name or Label + Название + + + + Use a Blacklist (Allow all incoming messages except those on the Blacklist) + Использовать черный список (Разрешить все входящие сообщения, кроме указанных в черном списке) + + + + Use a Whitelist (Block all incoming messages except those on the Whitelist) + Использовать белый список (блокировать все входящие сообщения, кроме указанных в белом списке) + + + + Blacklist + Черный список + + + + Stream # + № потока + + + + Connections + Соединений + + + + Total connections: 0 + Всего соединений: 0 + + + + Since startup at asdf: + С начала работы программы в asdf: + + + + Processed 0 person-to-person message. + Обработано 0 сообщений. + + + + Processed 0 public key. + Обработано 0 открытых ключей. + + + + Processed 0 broadcast. + Обработано 0 рассылок. + + + + Network Status + Статус сети + + + + File + Файл + + + + Settings + Настройки + + + + Help + Помощь + + + + Import keys + Импортировать ключи + + + + Manage keys + Управлять ключами + + + + About + О программе + + + + Regenerate deterministic addresses + Сгенерировать заново все адреса + + + + Delete all trashed messages + Стереть все сообщения из корзины + + + + NewAddressDialog + + + Create new Address + Создать новый адрес + + + + Here you may generate as many addresses as you like. Indeed, creating and abandoning addresses is encouraged. You may generate addresses by using either random numbers or by using a passphrase. If you use a passphrase, the address is called a "deterministic" address. +The 'Random Number' option is selected by default but deterministic addresses have several pros and cons: + Здесь Вы сможете сгенерировать столько адресов сколько хотите. На самом деле, создание и выкидывание адресов даже поощряется. Вы можете сгенерировать адреса используя либо генератор случайных чисел либо придумав секретную фразу. Если Вы используете секретную фразу, то адреса будут называться "детерминистическими". Генератор случайных чисел выбран по умолчанию, однако детерминистические адреса имеют следующие плюсы и минусы по сравнению с ними: + + + + <html><head/><body><p><span style=" font-weight:600;">Pros:<br/></span>You can recreate your addresses on any computer from memory. <br/>You need-not worry about backing up your keys.dat file as long as you can remember your passphrase. <br/><span style=" font-weight:600;">Cons:<br/></span>You must remember (or write down) your passphrase if you expect to be able to recreate your keys if they are lost. <br/>You must remember the address version number and the stream number along with your passphrase. <br/>If you choose a weak passphrase and someone on the Internet can brute-force it, they can read your messages and send messages as you.</p></body></html> + <html><head/><body><p><span style=" font-weight:600;">Плюсы:<br/></span>Вы сможете восстановить адрес по памяти на любом компьютере<br/>Вам не нужно беспокоиться о сохранении файла keys.dat, если Вы запомнили секретную фразу<br/><span style=" font-weight:600;">Минусы:<br/></span>Вы должны запомнить (или записать) секретную фразу, если Вы хотите когда-либо восстановить Ваш адрес на другом компьютере <br/>Вы должны также запомнить версию адреса и номер потока вместе с секретной фразой<br/>Если Вы выберите слишком короткую секретную фразу, кто-нибудь в интернете сможет подобрать ключ и, как следствие, читать и отправлять от Вашего имени сообщения.</p></body></html> + + + + Use a random number generator to make an address + Использовать генератор случайных чисел для создания адреса + + + + Use a passphrase to make addresses + Использовать секретную фразу для создания адресов + + + + Spend several minutes of extra computing time to make the address(es) 1 or 2 characters shorter + Потратить несколько лишних минут, чтобы сделать адрес(а) короче на 1 или 2 символа + + + + Make deterministic addresses + Создать детерминистический адрес + + + + Address version number: 3 + Версия адреса: 3 + + + + In addition to your passphrase, you must remember these numbers: + В дополнение к секретной фразе, Вам необходимо запомнить эти числа: + + + + Passphrase + Придумайте секретную фразу + + + + Number of addresses to make based on your passphrase: + Кол-во адресов, которые Вы хотите получить из секретной фразы: + + + + Stream number: 1 + Номер потока: 1 + + + + Retype passphrase + Повторите секретную фразу + + + + Randomly generate address + Сгенерировать случайный адрес + + + + Label (not shown to anyone except you) + Название (не показывается никому кроме Вас) + + + + Use the most available stream + Использовать наиболее доступный поток + + + + (best if this is the first of many addresses you will create) + (выберите этот вариант, если это лишь первый из многих адресов, которые Вы планируете создать) + + + + Use the same stream as an existing address + Использовать тот же поток, что и указанный существующий адрес + + + + (saves you some bandwidth and processing power) + (немного сэкономит Вам пропускную способность сети и вычислительную мощь) + + + + NewChanDialog + + + Dialog + Новый chan + + + + Create a new chan + Создать новый chan + + + + Join a chan + Присоединиться к chan + + + + <html><head/><body><p>A chan is a set of encryption keys that is shared by a group of people. The keys and bitmessage address used by a chan is generated from a human-friendly word or phrase (the chan name).</p><p>Chans are experimental and are unmoderatable.</p></body></html> + <html><head/><body><p>Chan - это набор ключей шифрования, которые известны некоторой группе людей. Ключи и Bitmessage-адрес используемый chan-ом генерируется из слова или фразы (имя chan-а).</p><p>Chan-ы - это экспериментальная новинка.</p></body></html> + + + + Chan name: + Имя chan: + + + + Chan bitmessage address: + Bitmessage адрес chan: + + + + Create a chan + Создать chan + + + + Enter a name for your chan. If you choose a sufficiently complex chan name (like a strong and unique passphrase) and none of your friends share it publicly then the chan will be secure and private. + Введите имя Вашего chan-a. Если Вы выберете достаточно сложное имя для chan-а (например, сложную и необычную секретную фразу) и никто из Ваших друзей не опубликует эту фразу, то Вам chan будет надежно зашифрован. + + + + NewSubscriptionDialog + + + Add new entry + Добавить новую запись + + + + Label + Название + + + + Address + Адрес + + + + SpecialAddressBehaviorDialog + + + Special Address Behavior + Особое поведение адреса + + + + Behave as a normal address + Вести себя как обычный адрес + + + + Behave as a pseudo-mailing-list address + Вести себя как адрес псевдо-рассылки + + + + Mail received to a pseudo-mailing-list address will be automatically broadcast to subscribers (and thus will be public). + Почта, полученная на адрес псевдо-рассылки, будет автоматически разослана всем подписчикам (и поэтому будет доступна общей публике). + + + + Name of the pseudo-mailing-list: + Имя псевдо-рассылки: + + + + aboutDialog + + + About + О программе + + + + PyBitmessage + PyBitmessage + + + + version ? + версия ? + + + + Copyright © 2013 Jonathan Warren + Копирайт © 2013 Джонатан Уоррен + + + + <html><head/><body><p>Distributed under the MIT/X11 software license; see <a href="http://www.opensource.org/licenses/mit-license.php"><span style=" text-decoration: underline; color:#0000ff;">http://www.opensource.org/licenses/mit-license.php</span></a></p></body></html> + <html><head/><body><p>Программа распространяется в соответствии с лицензией MIT/X11; см. <a href="http://www.opensource.org/licenses/mit-license.php"><span style=" text-decoration: underline; color:#0000ff;">http://www.opensource.org/licenses/mit-license.php</span></a></p></body></html> + + + + This is Beta software. + Это бета версия программы. + + + + helpDialog + + + Help + Помощь + + + + <a href="http://Bitmessage.org/wiki/PyBitmessage_Help">http://Bitmessage.org/wiki/PyBitmessage_Help</a> + <a href="http://Bitmessage.org/wiki/PyBitmessage_Help">http://Bitmessage.org/wiki/PyBitmessage_Help</a> + + + + As Bitmessage is a collaborative project, help can be found online in the Bitmessage Wiki: + Bitmessage - общественный проект. Вы можете найти подсказки и советы на Wiki-страничке Bitmessage: + + + + iconGlossaryDialog + + + Icon Glossary + Описание значков + + + + You have no connections with other peers. + Нет соединения с другими участниками сети. + + + + You have made at least one connection to a peer using an outgoing connection but you have not yet received any incoming connections. Your firewall or home router probably isn't configured to forward incoming TCP connections to your computer. Bitmessage will work just fine but it would help the Bitmessage network if you allowed for incoming connections and will help you be a better-connected node. + На текущий момент Вы установили по-крайней мере одно исходящее соединение, но пока ни одного входящего. Ваш файрвол или маршрутизатор скорее всего не настроен на переброс входящих TCP соединений к Вашему компьютеру. Bitmessage будет прекрасно работать и без этого, но Вы могли бы помочь сети если бы разрешили и входящие соединения тоже. Это помогло бы Вам стать более важным узлом сети. + + + + You are using TCP port ?. (This can be changed in the settings). + Вы используете TCP порт ?. (Его можно поменять в настройках). + + + + You do have connections with other peers and your firewall is correctly configured. + Вы установили соединение с другими участниками сети и ваш файрвол настроен правильно. + + + + regenerateAddressesDialog + + + Regenerate Existing Addresses + Сгенерировать заново существующие адреса + + + + Regenerate existing addresses + Сгенерировать заново существующие адреса + + + + Passphrase + Секретная фраза + + + + Number of addresses to make based on your passphrase: + Кол-во адресов, которые Вы хотите получить из Вашей секретной фразы: + + + + Address version Number: + Версия адреса: + + + + 3 + 3 + + + + Stream number: + Номер потока: + + + + 1 + 1 + + + + Spend several minutes of extra computing time to make the address(es) 1 or 2 characters shorter + Потратить несколько лишних минут, чтобы сделать адрес(а) короче на 1 или 2 символа + + + + You must check (or not check) this box just like you did (or didn't) when you made your addresses the first time. + Вы должны кликнуть эту галочку (или не кликать) точно также как Вы сделали в самый первый раз, когда создавали Ваши адреса. + + + + If you have previously made deterministic addresses but lost them due to an accident (like hard drive failure), you can regenerate them here. If you used the random number generator to make your addresses then this form will be of no use to you. + Если Вы ранее делали детерминистические адреса, но случайно потеряли их, Вы можете их восстановить здесь. Если же Вы использовали генератор случайных чисел, чтобы создать Ваши адреса, то Вы не сможете их здесь восстановить. + + + + settingsDialog + + + Settings + Настройки + + + + Start Bitmessage on user login + Запускать Bitmessage при входе в систему + + + + Start Bitmessage in the tray (don't show main window) + Запускать Bitmessage в свернутом виде (не показывать главное окно) + + + + Minimize to tray + Сворачивать в трей + + + + Show notification when message received + Показывать уведомления при получении новых сообщений + + + + Run in Portable Mode + Запустить в переносном режиме + + + + In Portable Mode, messages and config files are stored in the same directory as the program rather than the normal application-data folder. This makes it convenient to run Bitmessage from a USB thumb drive. + В переносном режиме, все сообщения и конфигурационные файлы сохраняются в той же самой папке что и сама программа. Это делает более удобным использование Bitmessage с USB-флэшки. + + + + User Interface + Пользовательские + + + + Listening port + Порт прослушивания + + + + Listen for connections on port: + Прослушивать соединения на порту: + + + + Proxy server / Tor + Прокси сервер / Tor + + + + Type: + Тип: + + + + none + отсутствует + + + + SOCKS4a + SOCKS4a + + + + SOCKS5 + SOCKS5 + + + + Server hostname: + Адрес сервера: + + + + Port: + Порт: + + + + Authentication + Авторизация + + + + Username: + Имя пользователя: + + + + Pass: + Прль: + + + + Network Settings + Сетевые настройки + + + + When someone sends you a message, their computer must first complete some work. The difficulty of this work, by default, is 1. You may raise this default for new addresses you create by changing the values here. Any new addresses you create will require senders to meet the higher difficulty. There is one exception: if you add a friend or acquaintance to your address book, Bitmessage will automatically notify them when you next send a message that they need only complete the minimum amount of work: difficulty 1. + Когда кто-либо отправляет Вам сообщение, его компьютер должен сперва решить определенную вычислительную задачу. Сложность этой задачи по умолчанию равна 1. Вы можете повысить эту сложность для новых адресов, которые Вы создадите, здесь. Таким образом, любые новые адреса, которые Вы создадите, могут требовать от отправителей сложность большую чем 1. Однако, есть одно исключение: если Вы специально добавите Вашего собеседника в адресную книгу, то Bitmessage автоматически уведомит его о том, что для него минимальная сложность будет составлять всегда всего лишь 1. + + + + Total difficulty: + Общая сложность: + + + + Small message difficulty: + Сложность для маленьких сообщений: + + + + The 'Small message difficulty' mostly only affects the difficulty of sending small messages. Doubling this value makes it almost twice as difficult to send a small message but doesn't really affect large messages. + "Сложность для маленьких сообщений" влияет исключительно на небольшие сообщения. Увеличив это число в два раза, вы сделаете отправку маленьких сообщений в два раза сложнее, в то время как сложность отправки больших сообщений не изменится. + + + + The 'Total difficulty' affects the absolute amount of work the sender must complete. Doubling this value doubles the amount of work. + "Общая сложность" влияет на абсолютное количество вычислений, которые отправитель должен провести, чтобы отправить сообщение. Увеличив это число в два раза, вы увеличите в два раза объем требуемых вычислений. + + + + Demanded difficulty + Требуемая сложность + + + + Here you may set the maximum amount of work you are willing to do to send a message to another person. Setting these values to 0 means that any value is acceptable. + Здесь Вы можете установить максимальную вычислительную работу, которую Вы согласны проделать, чтобы отправить сообщение другому пользователю. Ноль означает, чтобы любое значение допустимо. + + + + Maximum acceptable total difficulty: + Макс допустимая общая сложность: + + + + Maximum acceptable small message difficulty: + Макс допустимая сложность для маленький сообщений: + + + + Max acceptable difficulty + Макс допустимая сложность + + +