diff --git a/www/i18n/locale-en-GB.json b/www/i18n/locale-en-GB.json index 649f01379cad76567e74aab8c898b442ee882096..7ccaed362d6277f3c7b8bb5270e4acdfe67b71ad 100644 --- a/www/i18n/locale-en-GB.json +++ b/www/i18n/locale-en-GB.json @@ -257,7 +257,7 @@ "VIEW": { "MEDIAN_TIME": "Blockchain time", "LOADING_PEERS": "Loading peers...", - "NODE_ADDRESS": "Peer address:", + "NODE_ADDRESS": "Address:", "WS2PID": "Identitifer:", "POW_PREFIX": "Proof of work prefix:", "ENDPOINTS": { diff --git a/www/i18n/locale-en.json b/www/i18n/locale-en.json index b3ccb2ef691325039166a91f53921f16834d0d74..20d7f58336e440685ae538e781add496632d2be0 100644 --- a/www/i18n/locale-en.json +++ b/www/i18n/locale-en.json @@ -257,7 +257,7 @@ "VIEW": { "MEDIAN_TIME": "Blockchain time", "LOADING_PEERS": "Loading peers...", - "NODE_ADDRESS": "Peer address:", + "NODE_ADDRESS": "Address:", "WS2PID": "Identitifer:", "POW_PREFIX": "Proof of work prefix:", "ENDPOINTS": { diff --git a/www/i18n/locale-es-ES.json b/www/i18n/locale-es-ES.json index 775675a8c0ad1ee3d7126b9bcb151287801e36af..a6eb539f7c495aacf356d414df27e257562ea65e 100644 --- a/www/i18n/locale-es-ES.json +++ b/www/i18n/locale-es-ES.json @@ -257,7 +257,7 @@ "VIEW": { "MEDIAN_TIME": "Hora de la blockchain", "LOADING_PEERS": "Carga de los nodos...", - "NODE_ADDRESS": "Dirección del nodo", + "NODE_ADDRESS": "Dirección :", "WS2PID": "ID :", "POW_PREFIX": "Préfixe de preuve de travail :", "ENDPOINTS": { diff --git a/www/i18n/locale-fr-FR.json b/www/i18n/locale-fr-FR.json index f09236dcbc188c87d5ba01afcb742da8551851b4..62c76e56d52f574aaa2f335d402272f1ae2e8be2 100644 --- a/www/i18n/locale-fr-FR.json +++ b/www/i18n/locale-fr-FR.json @@ -257,7 +257,7 @@ "VIEW": { "MEDIAN_TIME": "Heure de la blockchain", "LOADING_PEERS": "Chargement des noeuds...", - "NODE_ADDRESS": "Adresse du noeud :", + "NODE_ADDRESS": "Adresse :", "WS2PID": "Identifiant :", "POW_PREFIX": "Préfixe de preuve de travail :", "ENDPOINTS": { diff --git a/www/i18n/locale-nl-NL.json b/www/i18n/locale-nl-NL.json index d1d88ddace3b8f66c18e3878c9c60bbab0879cd5..09d92467b1f3bf2ed621093325c24424750628be 100644 --- a/www/i18n/locale-nl-NL.json +++ b/www/i18n/locale-nl-NL.json @@ -229,7 +229,7 @@ "VIEW": { "MEDIAN_TIME": "Blockchain tijd", "LOADING_PEERS": "Even geduld...", - "NODE_ADDRESS": "knooppunt adres", + "NODE_ADDRESS": "Adres :", "ENDPOINTS": { "BMAS": "Endpoint (SSL)", "BMATOR": "Endpoint TOR", diff --git a/www/js/services/bma-services.js b/www/js/services/bma-services.js index 1b06ac722ee323069a45ed13cf60599fea8fef93..481141223e35a1bdc678728cc9319f6a2c1904d3 100644 --- a/www/js/services/bma-services.js +++ b/www/js/services/bma-services.js @@ -29,8 +29,9 @@ angular.module('cesium.bma.services', ['ngApi', 'cesium.http.services', 'cesium. URI_WITH_PATH: "duniter://([a-zA-Z0-9-.]+.[a-zA-Z0-9-_:.]+)/([123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{43,44})(?:/([A-Za-z0-9_-]+))?", BMA_ENDPOINT: "BASIC_MERKLED_API" + REGEX_ENDPOINT_PARAMS, BMAS_ENDPOINT: "BMAS" + REGEX_ENDPOINT_PARAMS, - WS2P_ENDPOINT: "WS2P ([0-9a-z]+)"+ REGEX_ENDPOINT_PARAMS, - BMATOR_ENDPOINT: "BMATOR" + "( ([a-z0-9-_.]+.onion))( ([0-9]+))?" + WS2P_ENDPOINT: "WS2P ([a-f0-9]{8})"+ REGEX_ENDPOINT_PARAMS, + BMATOR_ENDPOINT: "BMATOR ([a-z0-9-_.]*|[0-9.]+|[0-9a-f:]+.onion)(?: ([0-9]+))?", + WS2PTOR_ENDPOINT: "WS2PTOR ([a-f0-9]{8}) ([a-z0-9-_.]*|[0-9.]+|[0-9a-f:]+.onion)(?: ([0-9]+))?(?: (.+))?" }, errorCodes = { REVOCATION_ALREADY_REGISTERED: 1002, @@ -352,6 +353,7 @@ angular.module('cesium.bma.services', ['ngApi', 'cesium.http.services', 'cesium. BMAS_ENDPOINT: exact(regexp.BMAS_ENDPOINT), WS2P_ENDPOINT: exact(regexp.WS2P_ENDPOINT), BMATOR_ENDPOINT: exact(regexp.BMATOR_ENDPOINT), + WS2PTOR_ENDPOINT: exact(regexp.WS2PTOR_ENDPOINT), // TX output conditions TX_OUTPUT_SIG: exact(SIG), TX_OUTPUT_FUNCTION: test(OUTPUT_FUNCTION), @@ -553,8 +555,8 @@ angular.module('cesium.bma.services', ['ngApi', 'cesium.http.services', 'cesium. matches = exports.regexp.BMATOR_ENDPOINT.exec(endpoint); if (matches) { return { - "dns": matches[2] || '', - "port": matches[4] || 80, + "dns": matches[1] || '', + "port": matches[2] || 80, "useSsl": false, "useTor": true, "useBma": true @@ -574,6 +576,19 @@ angular.module('cesium.bma.services', ['ngApi', 'cesium.http.services', 'cesium. "useWs2p": true }; } + // Try WS2PTOR + matches = exports.regexp.WS2PTOR_ENDPOINT.exec(endpoint); + if (matches) { + return { + "ws2pid": matches[1] || '', + "dns": matches[2] || '', + "port": matches[3] || 80, + "path": matches[4] || '', + "useSsl": false, + "useTor": true, + "useWs2p": true + }; + } }; exports.copy = function(otherNode) { diff --git a/www/js/services/network-services.js b/www/js/services/network-services.js index 3c06c4bcd9bbb8614c1466b83057b2131f87bf57..d196327cadfe70e03a0d6c15d5cb2a3301c673d6 100644 --- a/www/js/services/network-services.js +++ b/www/js/services/network-services.js @@ -1,7 +1,7 @@ angular.module('cesium.network.services', ['ngApi', 'cesium.bma.services', 'cesium.http.services']) -.factory('csNetwork', function($rootScope, $q, $interval, $timeout, $window, BMA, csHttp, Api, csCurrency) { +.factory('csNetwork', function($rootScope, $q, $interval, $timeout, $window, BMA, csHttp, Api) { 'ngInject'; factory = function(id) { @@ -601,7 +601,7 @@ angular.module('cesium.network.services', ['ngApi', 'cesium.bma.services', 'cesi $timeout(function() { console.debug('[network] new block received by WS: will refresh peers'); loadPeers(); - }, 2000); + }, 2000, false /*invokeApply*/); } } }); diff --git a/www/plugins/es/js/services/http-services.js b/www/plugins/es/js/services/http-services.js index cbeb910a4344d8a651048966894b3b687a221a7d..4d36329d64e4c82996cd1b06c57fbb31dbddb3bb 100644 --- a/www/plugins/es/js/services/http-services.js +++ b/www/plugins/es/js/services/http-services.js @@ -248,7 +248,6 @@ angular.module('cesium.es.http.services', ['ngResource', 'ngApi', 'cesium.servic .then(function (confirm) { if (!confirm) return false; // stop the loop - UIUtils.loading.show(); that.cleanCache(); that.init(fallbackNode.host, fallbackNode.port, fallbackNode.wsPort, fallbackNode.useSsl || fallbackNode.port == 443); diff --git a/www/templates/network/item_content_peer.html b/www/templates/network/item_content_peer.html index 129e85acacc94670849aa3543f74a31a28ecd979..e46bbc7e803f5c3d8f5991e9571fb9c1ff1bb7c2 100644 --- a/www/templates/network/item_content_peer.html +++ b/www/templates/network/item_content_peer.html @@ -43,6 +43,9 @@ <div ng-if=":rebind:!peer.isWs2p()&&peer.isTor()" ng-click="showEndpointsPopover($event, peer, 'BMATOR')"> <i class="ion-bma-tor-api"></i> </div> + <div ng-if=":rebind:peer.isWs2p()&&peer.isTor()" ng-click="showWs2pPopover($event, peer)"> + <i class="ion-bma-tor-api"></i> + </div> </div> <div class="col col-20 no-padding text-center" ng-if="::expertMode && search.type != 'offline'"> <h3 class="hidden-sm hidden-xs gray">