diff --git a/.classpath b/.classpath
index 6fc97e48f..ebace4e59 100644
--- a/.classpath
+++ b/.classpath
@@ -100,6 +100,5 @@
-
diff --git a/addon/YaCy.app/Contents/Info.plist b/addon/YaCy.app/Contents/Info.plist
index 69804aa9f..5f772f193 100644
--- a/addon/YaCy.app/Contents/Info.plist
+++ b/addon/YaCy.app/Contents/Info.plist
@@ -19,7 +19,7 @@
CFBundleAllowMixedLocalizationstrueCFBundleExecutable
-startYACY.sh
+startYACYMacOS.shCFBundleDevelopmentRegionEnglishCFBundlePackageType
diff --git a/addon/YaCy.app/Contents/MacOS/startYACYMacOS.sh b/addon/YaCy.app/Contents/MacOS/startYACYMacOS.sh
new file mode 100755
index 000000000..692ec913f
--- /dev/null
+++ b/addon/YaCy.app/Contents/MacOS/startYACYMacOS.sh
@@ -0,0 +1,8 @@
+#!/usr/bin/env sh
+
+# Launcher for YaCy in a MacOS bundle :
+# rely on the generic startYACY.sh, but specifies the user home relative path for YaCy data
+# This data directory is set in conforming to OS X File System Programming Guide
+# see : https://developer.apple.com/library/ios/documentation/FileManagement/Conceptual/FileSystemProgrammingGuide/MacOSXDirectories/MacOSXDirectories.html
+
+"`dirname $0`"/startYACY.sh -s "'Library/Application Support/net.yacy.YaCy'"
diff --git a/build.xml b/build.xml
index faeb82bc0..14acd7b66 100644
--- a/build.xml
+++ b/build.xml
@@ -242,7 +242,6 @@
-
@@ -765,7 +764,8 @@
-
+
+
diff --git a/docker/Dockerfile b/docker/Dockerfile
index 35102e4d6..401d1f1d0 100644
--- a/docker/Dockerfile
+++ b/docker/Dockerfile
@@ -18,6 +18,10 @@ WORKDIR /opt
# - Compile with ant
# - remove unnecessary and size consuming .git directory
# - remove ant and git packages
+
+# Possible alternative : copy directly your current sources an remove git clone command from the following RUN
+# COPY . /opt/yacy_search_server/
+
RUN apt-get update && \
apt-get install -yq ant git && \
git clone https://github.com/yacy/yacy_search_server.git && \
@@ -30,14 +34,17 @@ RUN apt-get update && \
# Set initial admin password : "docker" (encoded with custom yacy md5 function net.yacy.cora.order.Digest.encodeMD5Hex())
RUN sed -i "/adminAccountBase64MD5=/c\adminAccountBase64MD5=MD5:e672161ffdce91be4678605f4f4e6786" /opt/yacy_search_server/defaults/yacy.init
+# Intially enable HTTPS : this is the most secure option for remote administrator authentication
+RUN sed -i "/server.https=false/c\server.https=true" /opt/yacy_search_server/defaults/yacy.init
+
# Create user and group yacy : this user will be used to run YaCy main process
RUN adduser --system --group --no-create-home --disabled-password yacy
# Set ownership of yacy install directory to yacy user/group
RUN chown yacy:yacy -R /opt/yacy_search_server
-# Expose port 8090
-EXPOSE 8090
+# Expose HTTP and HTTPS default ports
+EXPOSE 8090 8443
# Set data volume : yacy data and configuration will persist aven after container stop or destruction
VOLUME ["/opt/yacy_search_server/DATA"]
diff --git a/docker/Dockerfile.alpine b/docker/Dockerfile.alpine
index 497dd70ed..77134f222 100755
--- a/docker/Dockerfile.alpine
+++ b/docker/Dockerfile.alpine
@@ -51,6 +51,10 @@ WORKDIR /opt
# - compile with apache ant
# - remove unnecessary and size consuming .git directory
# - delete git package and ant binary install
+
+# Possible alternative : copy directly your current sources an remove git clone command from the following RUN
+# COPY . /opt/yacy_search_server/
+
RUN apk update && \
apk add --no-cache git && \
git clone https://github.com/yacy/yacy_search_server.git && \
@@ -62,14 +66,17 @@ RUN apk update && \
# Set initial admin password : "docker" (encoded with custom yacy md5 function net.yacy.cora.order.Digest.encodeMD5Hex())
RUN sed -i "/adminAccountBase64MD5=/c\adminAccountBase64MD5=MD5:e672161ffdce91be4678605f4f4e6786" /opt/yacy_search_server/defaults/yacy.init
+# Intially enable HTTPS : this is the most secure option for remote administrator authentication
+RUN sed -i "/server.https=false/c\server.https=true" /opt/yacy_search_server/defaults/yacy.init
+
# Create user and group yacy : this user will be used to run YaCy main process
RUN addgroup yacy && adduser -S -G yacy -H -D yacy
# Set ownership of yacy install directory to yacy user/group
RUN chown yacy:yacy -R /opt/yacy_search_server
-# Expose port 8090
-EXPOSE 8090
+# Expose HTTP and HTTPS default ports
+EXPOSE 8090 8443
# Set data volume : yacy data and configuration will persist aven after container stop or destruction
VOLUME ["/opt/yacy_search_server/DATA"]
diff --git a/docker/Readme.md b/docker/Readme.md
index 0ff35757f..9c9d7c07e 100755
--- a/docker/Readme.md
+++ b/docker/Readme.md
@@ -18,6 +18,11 @@ Using yacy_search_server/docker/Dockerfile :
cd yacy_search_server/docker
docker build .
+To build the Alpine variant :
+
+ cd yacy_search_server/docker
+ docker build -f Dockerfile.alpine .
+
## Image variants
`luccioman/yacy:latest`
@@ -49,12 +54,12 @@ You can retrieve the container IP address with `docker inspect`.
#### Easier to handle
- docker run --name yacy -p 8090:8090 --log-opt max-size=100m --log-opt max-file=2 luccioman/yacy
+ docker run --name yacy -p 8090:8090 -p 8443:8443 --log-opt max-size=200m --log-opt max-file=2 luccioman/yacy
##### Options detail
* --name : allow easier management of your container (without it, docker automatically generate a new name at each startup).
-* -p : map host port and container port, allowing web interface access through the usual http://localhost:8090.
+* -p 8090:8090 -p 8443:8443 : map host ports to YaCy container ports, allowing web interface access through the usual http://localhost:8090 and https://localhost:8443 (you can set a different mapping, for example -p 443:8443 if you prefer to use the default HTTPS port on your host)
* --log-opt max-size : limit maximum docker log file size for this container
* --log-opt max-file : limit number of docker rotated log files for this container
@@ -76,9 +81,47 @@ Note that you can list all docker volumes with :
docker volume ls
-#### As background process
+#### Start as background process
docker run -d luccioman/yacy
+
+### HTTPS support
+
+This images are default configured with HTTPS enabled, and use a default certificate stored in defaults/freeworldKeystore. You should use your own certificate. In order to do it, you can proceed as follow.
+
+#### Self-signed certificate
+
+A self-signed certificate will provide encrypted communications with your YaCy server, but browsers will still complain about an invalid security certificate with the error "SEC_ERROR_UNKNOWN_ISSUER". If it is sufficient for you, you can permanently add and exception to your browser.
+
+This kind of certificate can be generated and added to your YaCy Docker container with the following :
+
+ keytool -keystore /var/lib/docker/volumes/[your_yacy_volume]/_data/SETTINGS/yacykeystore -genkey -keyalg RSA -alias yacycert
+
+Then edit YaCy config file. For example with the nano text editor :
+
+ nano /var/lib/docker/volumes/[your_yacy_volume]/_data/SETTINGS/yacy.conf
+
+And configure the keyStoreXXXX properties accordingly :
+
+ keyStore=/opt/yacy_search_server/DATA/SETTINGS/yacykeystore
+ keyStorePassword=yourpassword
+
+#### Import an existing certificate:
+
+Importing a certificate validated by a certification authority (CA) will ensure you have full HTTPS support with no security errors when accessing your YaCy peer. You can import an existing certificate in pkcs12 format.
+
+First copy it to the YaCy Docker container volume :
+
+ cp [yourStore].pkcs12 /var/lib/docker/volumes/[your_yacy_volume]/_data/SETTINGS/[yourStore].pkcs12
+
+Then edit YaCy config file. For example with the nano text editor :
+
+ nano /var/lib/docker/volumes/[your_yacy_volume]/_data/SETTINGS/yacy.conf
+
+And configure the pkcs12XXX properties accordingly :
+
+ pkcs12ImportFile=/opt/yacy_search_server/DATA/SETTINGS/[yourStore].pkcs12
+ pkcs12ImportPwd=yourpassword
### Next starts
@@ -109,7 +152,7 @@ OR
Create new container based on pulled image, using volume data from old container :
- docker create --name [tmp-container_name] -p 8090:8090 --volumes-from=[container_name] --log-opt max-size=100m --log-opt max-file=2 luccioman/yacy:latest
+ docker create --name [tmp-container_name] -p 8090:8090 -p 8443:8443 --volumes-from=[container_name] --log-opt max-size=100m --log-opt max-file=2 luccioman/yacy:latest
Stop old container :
diff --git a/docker/docker-cloud.yml b/docker/docker-cloud.yml
index 24a09a69b..97e965bd7 100644
--- a/docker/docker-cloud.yml
+++ b/docker/docker-cloud.yml
@@ -2,5 +2,6 @@ yacy:
image: 'luccioman/yacy:latest'
ports:
- '8090:8090'
+ - '8443:8443'
restart: on-failure
autoredeploy: true
\ No newline at end of file
diff --git a/htroot/DictionaryLoader_p.html b/htroot/DictionaryLoader_p.html
index 95446429b..a37d8647f 100644
--- a/htroot/DictionaryLoader_p.html
+++ b/htroot/DictionaryLoader_p.html
@@ -231,6 +231,16 @@
Action
#(syn1Status)#::#(/syn1Status)#
+
+
Russian Thesaurus
+
The data was converted to the YaCy synonym file format and part of the YaCy distribution.
+
+
+
+
#(syn2Status)#
Deactivated
::
Activated
#(/syn2Status)#
+
Action
+
#(syn2Status)#::#(/syn2Status)#
+
#%env/templates/footer.template%#
diff --git a/htroot/DictionaryLoader_p.java b/htroot/DictionaryLoader_p.java
index 58e4feafb..9b455abaf 100644
--- a/htroot/DictionaryLoader_p.java
+++ b/htroot/DictionaryLoader_p.java
@@ -45,10 +45,12 @@ public class DictionaryLoader_p {
final serverObjects prop = new serverObjects(); // return variable that accumulates replacements
final File synonyms_path = new File(sb.dictionariesPath, LibraryProvider.path_to_synonym_dictionaries);
- final File synonym_de_default = new File(new File(new File(sb.appPath, "addon"), "synonyms"), "openthesaurus_de_yacy");
+ final File synonym_de_default = new File(sb.appPath, "addon/synonyms/openthesaurus_de_yacy");
final File synonym_de_production = new File(synonyms_path, synonym_de_default.getName());
- final File synonym_en_default = new File(new File(new File(sb.appPath, "addon"), "synonyms"), "mobythesaurus_en_yacy");
+ final File synonym_en_default = new File(sb.appPath, "addon/synonyms/mobythesaurus_en_yacy");
final File synonym_en_production = new File(synonyms_path, synonym_en_default.getName());
+ final File synonym_ru_default = new File(sb.appPath, "addon/synonyms/thesaurus_ru_yacy");
+ final File synonym_ru_production = new File(synonyms_path, synonym_ru_default.getName());
/*
* distinguish the following cases:
* - dictionary file was not loaded -> actions: load the file
@@ -70,7 +72,7 @@ public class DictionaryLoader_p {
// check here only if there is no possibility synonym libraries have been activated/deactivated
prop.put("syn0Status", synonym_de_production.exists() ? 1 : 0);
prop.put("syn1Status", synonym_en_production.exists() ? 1 : 0);
-
+ prop.put("syn2Status", synonym_ru_production.exists() ? 1 : 0);
return prop;
}
@@ -322,11 +324,25 @@ public class DictionaryLoader_p {
}
SynonymLibrary.init(synonyms_path);
}
-
+
+ if (post.containsKey("syn2Deactivate")) {
+ synonym_ru_production.delete();
+ SynonymLibrary.init(synonyms_path);
+ }
+
+ if (post.containsKey("syn2Activate")) {
+ try {
+ FileUtils.copy(new FileInputStream(synonym_ru_default), synonym_ru_production);
+ } catch (IOException e) {
+ ConcurrentLog.logException(e);
+ }
+ SynonymLibrary.init(synonyms_path);
+ }
if (post != null) {
// check here if there is a possibility synonym libraries have been activated/deactivated
prop.put("syn0Status", synonym_de_production.exists() ? 1 : 0);
prop.put("syn1Status", synonym_en_production.exists() ? 1 : 0);
+ prop.put("syn2Status", synonym_ru_production.exists() ? 1 : 0);
}
// check status again
diff --git a/htroot/News.html b/htroot/News.html
index 1c2b83507..320717d3d 100644
--- a/htroot/News.html
+++ b/htroot/News.html
@@ -43,6 +43,10 @@
A change in the personal profile will create a news entry. You can see recently made changes of
profile entries on the Network page, where that profile change is visualized with a '*' beside the 'P' (profile) - selector.
+
+ Publishing of added or modified translation for the user interface. Other peers may include it in their local translation list.
+ To publish a translation, use the integrated translation editor to add a translation and publish it afterwards.
+
More news services will follow.
diff --git a/htroot/Supporter.java b/htroot/Supporter.java
index 391a0c9a5..02f44197b 100644
--- a/htroot/Supporter.java
+++ b/htroot/Supporter.java
@@ -38,6 +38,7 @@ import net.yacy.cora.order.NaturalOrder;
import net.yacy.cora.protocol.RequestHeader;
import net.yacy.cora.sorting.ConcurrentScoreMap;
import net.yacy.cora.sorting.ScoreMap;
+import net.yacy.cora.util.ConcurrentLog;
import net.yacy.kelondro.index.Row;
import net.yacy.kelondro.index.Row.Entry;
import net.yacy.peers.NewsDB;
@@ -258,7 +259,7 @@ public class Supporter {
urlhash = null;
}
if (urlhash==null) {
- System.out.println("Supporter: bad url '" + url + "' from news record " + record.toString());
+ ConcurrentLog.info("Supporter", "bad url '" + url + "' from news record " + record.toString());
continue;
}
if ((vote = negativeHashes.get(urlhash)) != null) {
diff --git a/htroot/TransNews_p.html b/htroot/TransNews_p.html
new file mode 100644
index 000000000..7e69deedb
--- /dev/null
+++ b/htroot/TransNews_p.html
@@ -0,0 +1,62 @@
+
+
+