Skip to content

Commit

Permalink
remove trailing whitespaces
Browse files Browse the repository at this point in the history
  • Loading branch information
yangfl committed Jan 6, 2018
1 parent b91efaa commit 46f62e1
Show file tree
Hide file tree
Showing 117 changed files with 3,037 additions and 3,038 deletions.
6 changes: 3 additions & 3 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@

## [2.15.0] - 2017-08-17
### Added
- QT GUI
- QT GUI
- Ability to add and remove I2P tunnels without restart
- Ability to disable SOCKS outproxy option
### Changed
Expand Down Expand Up @@ -81,7 +81,7 @@
- Some stats in a main window for Windows version
### Changed
- Reseed servers list
- MTU of 1488 for ipv6
- MTU of 1488 for ipv6
- Android and Mac OS X versions use OpenSSL 1.1
- New logo for Android
### Fixed
Expand Down Expand Up @@ -111,7 +111,7 @@
## [2.10.2] - 2016-12-04
### Fixed
- Fixes UPnP discovery bug, producing excessive CPU usage
- Fixes sudden SSU thread stop for Windows.
- Fixes sudden SSU thread stop for Windows.

## [2.10.1] - 2016-11-07
### Fixed
Expand Down
8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ RUN mkdir /user && adduser -S -h /user i2pd && chown -R i2pd:nobody /user


#
# Each RUN is a layer, adding the dependencies and building i2pd in one layer takes around 8-900Mb, so to keep the
# Each RUN is a layer, adding the dependencies and building i2pd in one layer takes around 8-900Mb, so to keep the
# image under 20mb we need to remove all the build dependencies in the same "RUN" / layer.
#

# 1. install deps, clone and build.
# 2. strip binaries.
# 3. Purge all dependencies and other unrelated packages, including build directory.
# 1. install deps, clone and build.
# 2. strip binaries.
# 3. Purge all dependencies and other unrelated packages, including build directory.
RUN apk --no-cache --virtual build-dependendencies add make gcc g++ libtool boost-dev build-base openssl-dev openssl git \
&& mkdir -p /tmp/build \
&& cd /tmp/build && git clone -b ${GIT_BRANCH} https://github.com/PurpleI2P/i2pd.git \
Expand Down
2 changes: 1 addition & 1 deletion Makefile.homebrew
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ BOOSTROOT = ${BREWROOT}/opt/boost
SSLROOT = ${BREWROOT}/opt/libressl
UPNPROOT = ${BREWROOT}/opt/miniupnpc
CXXFLAGS = -g -Wall -std=c++11 -DMAC_OSX -Wno-overloaded-virtual
INCFLAGS = -I${SSLROOT}/include -I${BOOSTROOT}/include
INCFLAGS = -I${SSLROOT}/include -I${BOOSTROOT}/include

ifndef TRAVIS
CXX = clang++
Expand Down
2 changes: 1 addition & 1 deletion Makefile.linux
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ INCFLAGS ?=
# detect proper flag for c++11 support by compilers
CXXVER := $(shell $(CXX) -dumpversion)
ifeq ($(shell expr match $(CXX) 'clang'),5)
NEEDED_CXXFLAGS += -std=c++11
NEEDED_CXXFLAGS += -std=c++11
else ifeq ($(shell expr match ${CXXVER} "4\.[0-9][0-9]"),4) # gcc >= 4.10
NEEDED_CXXFLAGS += -std=c++11
else ifeq ($(shell expr match ${CXXVER} "4\.[7-9]"),3) # >= 4.7
Expand Down
2 changes: 1 addition & 1 deletion Makefile.osx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
CXX = clang++
CXXFLAGS = -Os -Wall -std=c++11 -DMAC_OSX
#CXXFLAGS = -g -O2 -Wall -std=c++11
INCFLAGS = -I/usr/local/include
INCFLAGS = -I/usr/local/include
LDFLAGS = -Wl,-rpath,/usr/local/lib -L/usr/local/lib

ifeq ($(USE_STATIC),yes)
Expand Down
34 changes: 17 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ i2pd

i2pd (I2P Daemon) is a full-featured C++ implementation of I2P client.

I2P (Invisible Internet Protocol) is a universal anonymous network layer.
I2P (Invisible Internet Protocol) is a universal anonymous network layer.
All communications over I2P are anonymous and end-to-end encrypted, participants
don't reveal their real IP addresses.
don't reveal their real IP addresses.

I2P client is a software used for building and using anonymous I2P
networks. Such networks are commonly used for anonymous peer-to-peer
applications (filesharing, cryptocurrencies) and anonymous client-server
I2P client is a software used for building and using anonymous I2P
networks. Such networks are commonly used for anonymous peer-to-peer
applications (filesharing, cryptocurrencies) and anonymous client-server
applications (websites, instant messengers, chat-servers).

I2P allows people from all around the world to communicate and share information
Expand All @@ -38,9 +38,9 @@ Resources
Installing
----------

The easiest way to install i2pd is by using
[precompiled binaries](https://github.com/PurpleI2P/i2pd/releases/latest).
See [documentation](https://i2pd.readthedocs.io/en/latest/) for how to build
The easiest way to install i2pd is by using
[precompiled binaries](https://github.com/PurpleI2P/i2pd/releases/latest).
See [documentation](https://i2pd.readthedocs.io/en/latest/) for how to build
i2pd from source on your OS.


Expand All @@ -58,25 +58,25 @@ Build instructions:
* Windows - [![Build status](https://ci.appveyor.com/api/projects/status/1908qe4p48ff1x23?svg=true)](https://ci.appveyor.com/project/PurpleI2P/i2pd)
* Mac OS X - [![Build Status](https://travis-ci.org/PurpleI2P/i2pd.svg?branch=openssl)](https://travis-ci.org/PurpleI2P/i2pd)
* FreeBSD
* Android
* Android
* iOS

Using i2pd
----------

See [documentation](https://i2pd.readthedocs.io/en/latest/user-guide/run/) and
See [documentation](https://i2pd.readthedocs.io/en/latest/user-guide/run/) and
[example config file](https://github.com/PurpleI2P/i2pd/blob/openssl/contrib/i2pd.conf).

Donations
---------

BTC: 1K7Ds6KUeR8ya287UC4rYTjvC96vXyZbDY
ZEC: t1cTckLuXsr1dwVrK4NDzfhehss4NvMadAJ
DASH: Xw8YUrQpYzP9tZBmbjqxS3M97Q7v3vJKUF
LTC: LKQirrYrDeTuAPnpYq5y7LVKtywfkkHi59
DOGE: DNXLQKziRPAsD9H3DFNjk4fLQrdaSX893Y
ANC: AQJYweYYUqM1nVfLqfoSMpUMfzxvS4Xd7z
GST: GbD2JSQHBHCKLa9WTHmigJRpyFgmBj4woG
BTC: 1K7Ds6KUeR8ya287UC4rYTjvC96vXyZbDY
ZEC: t1cTckLuXsr1dwVrK4NDzfhehss4NvMadAJ
DASH: Xw8YUrQpYzP9tZBmbjqxS3M97Q7v3vJKUF
LTC: LKQirrYrDeTuAPnpYq5y7LVKtywfkkHi59
DOGE: DNXLQKziRPAsD9H3DFNjk4fLQrdaSX893Y
ANC: AQJYweYYUqM1nVfLqfoSMpUMfzxvS4Xd7z
GST: GbD2JSQHBHCKLa9WTHmigJRpyFgmBj4woG

License
-------
Expand Down
2 changes: 1 addition & 1 deletion android/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@
</activity>
<service android:enabled="true" android:name=".ForegroundService"/>
</application>
</manifest>
</manifest>
4 changes: 2 additions & 2 deletions android/res/menu/options_main.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<menu
<menu
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
xmlns:tools="http://schemas.android.com/tools"
tools:context=".I2PD">
<item
android:id="@+id/action_graceful_quit"
Expand Down
28 changes: 14 additions & 14 deletions android/src/org/purplei2p/i2pd/DaemonSingleton.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,30 +14,30 @@ public static interface StateUpdateListener { void daemonStateUpdate(); }
public static DaemonSingleton getInstance() {
return instance;
}

public synchronized void addStateChangeListener(StateUpdateListener listener) { stateUpdateListeners.add(listener); }
public synchronized void removeStateChangeListener(StateUpdateListener listener) { stateUpdateListeners.remove(listener); }

public synchronized void stopAcceptingTunnels() {
if(isStartedOkay()){
state=State.gracefulShutdownInProgress;
fireStateUpdate();
I2PD_JNI.stopAcceptingTunnels();
}
}

public void onNetworkStateChange(boolean isConnected) {
I2PD_JNI.onNetworkStateChanged(isConnected);
}

private boolean startedOkay;

public static enum State {uninitialized,starting,jniLibraryLoaded,startedOkay,startFailed,gracefulShutdownInProgress};

private State state = State.uninitialized;

public State getState() { return state; }

public synchronized void start() {
if(state != State.uninitialized)return;
state = State.starting;
Expand Down Expand Up @@ -76,9 +76,9 @@ public void run() {
fireStateUpdate();
}
return;
}
}
}

}, "i2pdDaemonStart").start();
}
private Throwable lastThrowable;
Expand All @@ -87,10 +87,10 @@ public void run() {
private synchronized void fireStateUpdate() {
Log.i(TAG, "daemon state change: "+state);
for(StateUpdateListener listener : stateUpdateListeners) {
try {
listener.daemonStateUpdate();
} catch (Throwable tr) {
Log.e(TAG, "exception in listener ignored", tr);
try {
listener.daemonStateUpdate();
} catch (Throwable tr) {
Log.e(TAG, "exception in listener ignored", tr);
}
}
}
Expand All @@ -102,7 +102,7 @@ public Throwable getLastThrowable() {
public String getDaemonStartResult() {
return daemonStartResult;
}

private final Object startedOkayLock = new Object();

public boolean isStartedOkay() {
Expand Down
4 changes: 2 additions & 2 deletions android/src/org/purplei2p/i2pd/ForegroundService.java
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public int onStartCommand(Intent intent, int flags, int startId) {
public void onDestroy() {
// Cancel the persistent notification.
notificationManager.cancel(NOTIFICATION);

stopForeground(true);

// Tell the user we stopped.
Expand Down Expand Up @@ -91,7 +91,7 @@ private void showNotification() {
//mNM.notify(NOTIFICATION, notification);
startForeground(NOTIFICATION, notification);
}

private final DaemonSingleton daemon = DaemonSingleton.getInstance();
}

20 changes: 10 additions & 10 deletions android/src/org/purplei2p/i2pd/I2PD.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ public class I2PD extends Activity {
private static final String TAG = "i2pd";

private TextView textView;

private final DaemonSingleton daemon = DaemonSingleton.getInstance();
private DaemonSingleton.StateUpdateListener daemonStateUpdatedListener =

private DaemonSingleton.StateUpdateListener daemonStateUpdatedListener =
new DaemonSingleton.StateUpdateListener() {

@Override
public void daemonStateUpdate() {
runOnUiThread(new Runnable(){
Expand All @@ -53,7 +53,7 @@ public void run() {
});
}
};

@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Expand Down Expand Up @@ -123,7 +123,7 @@ public void onServiceDisconnected(ComponentName className) {
}
};


private boolean mIsBound;

private void doBindService() {
Expand All @@ -147,7 +147,7 @@ private void doUnbindService() {
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.options_main, menu);
getMenuInflater().inflate(R.menu.options_main, menu);
return true;
}

Expand Down Expand Up @@ -216,9 +216,9 @@ public void run() {

@Override
public void run() {
quit();
quit();
}

}, 10*60*1000/*milliseconds*/);
}else{
quit();
Expand All @@ -227,7 +227,7 @@ public void run() {
Log.e(TAG,"",tr);
}
}

},"gracQuitInit").start();
}

Expand Down
4 changes: 2 additions & 2 deletions android/src/org/purplei2p/i2pd/I2PD_JNI.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ public class I2PD_JNI {
public static native String startDaemon();
//should only be called after startDaemon() success
public static native void stopDaemon();

public static native void stopAcceptingTunnels();

public static native void onNetworkStateChanged(boolean isConnected);

public static void loadLibraries() {
Expand Down
2 changes: 1 addition & 1 deletion build/cmake_modules/FindMiniUPnPc.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@ else()
endif()

mark_as_advanced(MINIUPNPC_INCLUDE_DIR MINIUPNPC_LIBRARY)

endif()
2 changes: 1 addition & 1 deletion build/docker/old-ubuntu-based/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ RUN apt-get update && apt-get install -y libboost-dev libboost-filesystem-dev \
libssl-dev git build-essential

RUN git clone https://github.com/PurpleI2P/i2pd.git
WORKDIR /i2pd
WORKDIR /i2pd
RUN make

CMD ./i2pd
2 changes: 1 addition & 1 deletion contrib/apparmor/usr.sbin.i2pd
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Basic profile for i2pd
# Basic profile for i2pd
# Should work without modifications with Ubuntu/Debian packages
# Author: Darknet Villain <supervillain@riseup.net>
#
Expand Down
8 changes: 4 additions & 4 deletions contrib/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ RUN mkdir -p "$I2PD_HOME" "$DATA_DIR" \
&& chown -R i2pd:nobody "$I2PD_HOME"

#
# Each RUN is a layer, adding the dependencies and building i2pd in one layer takes around 8-900Mb, so to keep the
# Each RUN is a layer, adding the dependencies and building i2pd in one layer takes around 8-900Mb, so to keep the
# image under 20mb we need to remove all the build dependencies in the same "RUN" / layer.
#

# 1. install deps, clone and build.
# 2. strip binaries.
# 3. Purge all dependencies and other unrelated packages, including build directory.
# 1. install deps, clone and build.
# 2. strip binaries.
# 3. Purge all dependencies and other unrelated packages, including build directory.
RUN apk --no-cache --virtual build-dependendencies add make gcc g++ libtool boost-dev build-base openssl-dev openssl git \
&& mkdir -p /tmp/build \
&& cd /tmp/build && git clone -b ${GIT_BRANCH} ${REPO_URL} \
Expand Down
8 changes: 4 additions & 4 deletions contrib/i2pd.conf
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ ipv4 = true
ipv6 = false

## Network interface to bind to
# ifname =
# ifname =

## Enable NTCP transport (default = true)
# ntcp = true
Expand Down Expand Up @@ -88,18 +88,18 @@ ipv6 = false

[upnp]
## Enable or disable UPnP: automatic port forwarding (enabled by default in WINDOWS, ANDROID)
# enabled = false
# enabled = false

## Name i2pd appears in UPnP forwardings list (default = I2Pd)
# name = I2Pd

[reseed]
## Enable or disable reseed data verification.
## Enable or disable reseed data verification.
verify = true
## URLs to request reseed data from, separated by comma
## Default: "mainline" I2P Network reseeds
# urls = https://reseed.i2p-projekt.de/,https://i2p.mooo.com/netDb/,https://netdb.i2p2.no/
## Path to local reseed data file (.su3) for manual reseeding
## Path to local reseed data file (.su3) for manual reseeding
# file = /path/to/i2pseeds.su3
## or HTTPS URL to reseed from
# file = https://legit-website.com/i2pseeds.su3
Expand Down
Loading

0 comments on commit 46f62e1

Please sign in to comment.