Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • Synzvato/decentraleyes
  • gkrishnaks/decentraleyes
  • ExE-Boss/decentraleyes
  • whtsky/decentraleyes
  • grtgarrett/decentraleyes
  • An_dz/decentraleyes
  • Alaska/decentraleyes
  • finn/decentraleyes
  • klippy/decentraleyes
9 results
Show changes
Showing
with 1137 additions and 111 deletions
{
"extensionDescription":{
"message":"「無料」と称してあなたを追跡する大規模なCDNを迂回して、プライバシーを守ります。",
"description":"Extension description."
},
"disableProtectionTitle":{
"message":"このサイトでは保護を無効にする",
"description":"Disable protection title."
},
"enableProtectionTitle":{
"message":"保護を有効にする",
"description":"Enable protection title."
},
"amountInjectedTitle":{
"message":"ローカルのリソースを使用した回数",
"description":"Amount injected title."
},
"amountInjectedDescription":{
"message":"インストール後にローカルのCDNリソースを使用した回数です。",
"description":"Amount injected description."
},
"optionsTitle":{
"message":"オプション",
"description":"Options title."
},
"showIconBadgeTitle":{
"message":"Display injection counts on icon",
"description":"Show icon badge title."
},
"showIconBadgeDescription":{
"message":"Show the number of injected resources on the extension icon.",
"description":"Show icon badge description."
},
"blockMissingTitle":{
"message":"アドオンに含まれないリソースへのリクエストをブロックする",
"description":"Block requests for missing resources title."
},
"blockMissingDescription":{
"message":"必要なリソースがローカルで利用できない場合、リクエストを取り消します。",
"description":"Block requests for missing resources description."
},
"disablePrefetchTitle":{
"message":"Disable link prefetching",
"description":"Disable prefetch title."
},
"disablePrefetchDescription":{
"message":"Prevent disallowed requests from leaking out to delivery networks.",
"description":"Disable prefetch description."
},
"stripMetadataTitle":{
"message":"Strip metadata from allowed requests",
"description":"Strip metadata title."
},
"stripMetadataDescription":{
"message":"Erase sensitive data from allowed CDN requests for improved privacy.",
"description":"Strip metadata description."
},
"whitelistedDomainsTitle":{
"message":"保護から除外するドメイン",
"description":"Whitelisted domains title."
},
"whitelistedDomainsDescription":{
"message":"ホワイトリストに登録したいドメインを入力してください。エントリが複数ある場合、セミコロン (;) で区切ってください。",
"description":"Whitelisted domains description."
},
"advancedLabel":{
"message":"エラー内容",
"description":"Advanced label."
}
}
\ No newline at end of file
{
"extensionDescription":{
"message":"Beschermt tegen tracking via het \"gratis\", gecentraliseerd, verzorgen van content.",
"description":"Extension description."
},
"disableProtectionTitle":{
"message":"Bescherming voor deze website uitschakelen",
"description":"Disable protection title."
},
"enableProtectionTitle":{
"message":"Bescherming inschakelen",
"description":"Enable protection title."
},
"amountInjectedTitle":{
"message":"Teller voor lokaal geïnjecteerde bestanden",
"description":"Amount injected title."
},
"amountInjectedDescription":{
"message":"Aantal lokale Content Delivery Network-bestandsinjecties sinds installatie.",
"description":"Amount injected description."
},
"optionsTitle":{
"message":"Opties",
"description":"Options title."
},
"showIconBadgeTitle":{
"message":"Getelde injecties op icoon weergeven",
"description":"Show icon badge title."
},
"showIconBadgeDescription":{
"message":"Toon het aantal geïnjecteerde bestanden op het extensie-icoon.",
"description":"Show icon badge description."
},
"blockMissingTitle":{
"message":"Verzoeken voor ontbrekende items blokkeren",
"description":"Block requests for missing resources title."
},
"blockMissingDescription":{
"message":"Annuleer een onderschept verzoek wanneer het bestand niet lokaal beschikbaar is.",
"description":"Block requests for missing resources description."
},
"disablePrefetchTitle":{
"message":"Link prefetching uitschakelen",
"description":"Disable prefetch title."
},
"disablePrefetchDescription":{
"message":"Voorkom dat geweigerde verzoeken naar afleveringsnetwerken uitlekken.",
"description":"Disable prefetch description."
},
"stripMetadataTitle":{
"message":"Metadata uit toegestane verzoeken verwijderen",
"description":"Strip metadata title."
},
"stripMetadataDescription":{
"message":"Wis gevoelige gegevens uit toegestane CDN-verzoeken voor verbeterde privacy.",
"description":"Strip metadata description."
},
"whitelistedDomainsTitle":{
"message":"Sluit domeinen uit van inspecties",
"description":"Whitelisted domains title."
},
"whitelistedDomainsDescription":{
"message":"Voer de te negeren domeinen in. Scheid de waarden met puntkomma's (;).",
"description":"Whitelisted domains description."
},
"advancedLabel":{
"message":"Geavanceerd",
"description":"Advanced label."
}
}
\ No newline at end of file
{
"extensionDescription":{
"message":"Chroni przed śledzeniem przez ośrodki CDN.",
"description":"Extension description."
},
"disableProtectionTitle":{
"message":"Wyłącz ochronę dla tej witryny",
"description":"Disable protection title."
},
"enableProtectionTitle":{
"message":"Włącz ochronę",
"description":"Enable protection title."
},
"amountInjectedTitle":{
"message":"Licznik zasobów podanych lokalnie",
"description":"Amount injected title."
},
"amountInjectedDescription":{
"message":"Ilość wstrzyknięć z lokalnego Content Delivery Network od czasu instalacji.",
"description":"Amount injected description."
},
"optionsTitle":{
"message":"Ustawienia",
"description":"Options title."
},
"showIconBadgeTitle":{
"message":"Wyświetl licznik wstrzyknięć na ikonie",
"description":"Show icon badge title."
},
"showIconBadgeDescription":{
"message":"Pokaż ilość wstrzykniętych zasobów na ikonie rozszerzenia.",
"description":"Show icon badge description."
},
"blockMissingTitle":{
"message":"Blokuj żądania brakujących zasobów",
"description":"Block requests for missing resources title."
},
"blockMissingDescription":{
"message":"Anuluj przechwycone żądania jeśli wymagany zasób nie jest dostępny lokalnie.",
"description":"Block requests for missing resources description."
},
"disablePrefetchTitle":{
"message":"Wyłącz wczesne pobieranie linków",
"description":"Disable prefetch title."
},
"disablePrefetchDescription":{
"message":"Zapobiegaj wyciekaniu zabronionych zapytań do systemów dostarczania.",
"description":"Disable prefetch description."
},
"stripMetadataTitle":{
"message":"Usuwaj metadane z dozwolonych zapytań",
"description":"Strip metadata title."
},
"stripMetadataDescription":{
"message":"Usuwaj wrażliwe dane z dozwolonych zapytań do CDN aby zwiększyć prywatność.",
"description":"Strip metadata description."
},
"whitelistedDomainsTitle":{
"message":"Wyklucz domeny z analizy",
"description":"Whitelisted domains title."
},
"whitelistedDomainsDescription":{
"message":"Podaj domeny aby dodać je do białej listy. Oddziel wpisy średnikami (;).",
"description":"Whitelisted domains description."
},
"advancedLabel":{
"message":"Zaawansowane",
"description":"Advanced label."
}
}
\ No newline at end of file
{
"extensionDescription":{
"message":"Protege contra monitorização através de entrega de conteúdo centralizado.",
"description":"Extension description."
},
"disableProtectionTitle":{
"message":"Desativar proteção para este site",
"description":"Disable protection title."
},
"enableProtectionTitle":{
"message":"Ativar proteção",
"description":"Enable protection title."
},
"amountInjectedTitle":{
"message":"Contador para recursos injetados localmente",
"description":"Amount injected title."
},
"amountInjectedDescription":{
"message":"Quantidade de injeções de recurso Content Delivery Network locais desde a instalação.",
"description":"Amount injected description."
},
"optionsTitle":{
"message":"Opções",
"description":"Options title."
},
"showIconBadgeTitle":{
"message":"Mostrar contagem de injeções no ícone",
"description":"Show icon badge title."
},
"showIconBadgeDescription":{
"message":"Mostrar o número de recursos injetados no ícone da extensão.",
"description":"Show icon badge description."
},
"blockMissingTitle":{
"message":"Bloquear pedidos por falta de recursos",
"description":"Block requests for missing resources title."
},
"blockMissingDescription":{
"message":"Cancelar pedido intercetado se o recurso necessário não estiver disponível localmente.",
"description":"Block requests for missing resources description."
},
"disablePrefetchTitle":{
"message":"Desativar pré-obtenção de ligações",
"description":"Disable prefetch title."
},
"disablePrefetchDescription":{
"message":"Impedir recursos não permitidos de vazar para as redes de entrega.",
"description":"Disable prefetch description."
},
"stripMetadataTitle":{
"message":"Retirar metadados dos pedidos permitidos",
"description":"Strip metadata title."
},
"stripMetadataDescription":{
"message":"Limpar dados sensíveis de recursos CDN permitidos para melhoria de privacidade.",
"description":"Strip metadata description."
},
"whitelistedDomainsTitle":{
"message":"Excluir domínios de inspeções",
"description":"Whitelisted domains title."
},
"whitelistedDomainsDescription":{
"message":"Insira domínios para os colocar na lista branca. Separe múltiplas entradas com pontos e vírgulas (;).",
"description":"Whitelisted domains description."
},
"advancedLabel":{
"message":"Avançado",
"description":"Advanced label."
}
}
\ No newline at end of file
{
"extensionDescription":{
"message":"Te protejează împotriva urmăririi prin livrare \"gratuită\" de conținut centralizat.",
"description":"Extension description."
},
"disableProtectionTitle":{
"message":"Dezactivează protecția pentru acest site",
"description":"Disable protection title."
},
"enableProtectionTitle":{
"message":"Activează protecția",
"description":"Enable protection title."
},
"amountInjectedTitle":{
"message":"Contor pentru resursele injectate local",
"description":"Amount injected title."
},
"amountInjectedDescription":{
"message":"Cantitatea de resurse locale injectate de Rețelele care Livrează Conținut din momentul instalării.",
"description":"Amount injected description."
},
"optionsTitle":{
"message":"Opțiuni",
"description":"Options title."
},
"showIconBadgeTitle":{
"message":"Afișează numărul de dependențe înlocuite pe iconiță",
"description":"Show icon badge title."
},
"showIconBadgeDescription":{
"message":"Afișează numărul de resurse înlocuite pe iconița extensiei.",
"description":"Show icon badge description."
},
"blockMissingTitle":{
"message":"Blochează cererile pentru resursele care lipsesc",
"description":"Block requests for missing resources title."
},
"blockMissingDescription":{
"message":"Anulează cererile interceptate dacă resursa solicitată nu este disponibilă local.",
"description":"Block requests for missing resources description."
},
"disablePrefetchTitle":{
"message":"Dezactivează pre-încărcarea de linkuri",
"description":"Disable prefetch title."
},
"disablePrefetchDescription":{
"message":"Previne scurgerea request-uri nepermise către rețele de livrare.",
"description":"Disable prefetch description."
},
"stripMetadataTitle":{
"message":"Scoate metadatele din requesturi permise",
"description":"Strip metadata title."
},
"stripMetadataDescription":{
"message":"Șterge date sensibile din requesturi permise pentru îmbunătățirea confidențialității.",
"description":"Strip metadata description."
},
"whitelistedDomainsTitle":{
"message":"Exclude domeniile următoare de la inspecții",
"description":"Whitelisted domains title."
},
"whitelistedDomainsDescription":{
"message":"Introduceți domeniile dorite în lista albă. Separați intrările multiple între ele prin punct și virgulă (;).",
"description":"Whitelisted domains description."
},
"advancedLabel":{
"message":"Avansat",
"description":"Advanced label."
}
}
\ No newline at end of file
{
"extensionDescription":{
"message":"Защищает Вас от отслеживания через «бесплатные», централизованные CDN.",
"description":"Extension description."
},
"disableProtectionTitle":{
"message":"Отключить защиту для этого сайта",
"description":"Disable protection title."
},
"enableProtectionTitle":{
"message":"Включить защиту",
"description":"Enable protection title."
},
"amountInjectedTitle":{
"message":"Счётчик файлов «доставленных» локально",
"description":"Amount injected title."
},
"amountInjectedDescription":{
"message":"Количество локально «доставленных» файлов с момента установки.",
"description":"Amount injected description."
},
"optionsTitle":{
"message":"Настройки",
"description":"Options title."
},
"showIconBadgeTitle":{
"message":"Display injection counts on icon",
"description":"Show icon badge title."
},
"showIconBadgeDescription":{
"message":"Show the number of injected resources on the extension icon.",
"description":"Show icon badge description."
},
"blockMissingTitle":{
"message":"Блокировать запросы недостающих ресурсов",
"description":"Block requests for missing resources title."
},
"blockMissingDescription":{
"message":"Отменить перехваченный запрос, если требуемый ресурс не доступен локально (может «ломать» сайты).",
"description":"Block requests for missing resources description."
},
"disablePrefetchTitle":{
"message":"Disable link prefetching",
"description":"Disable prefetch title."
},
"disablePrefetchDescription":{
"message":"Prevent disallowed requests from leaking out to delivery networks.",
"description":"Disable prefetch description."
},
"stripMetadataTitle":{
"message":"Strip metadata from allowed requests",
"description":"Strip metadata title."
},
"stripMetadataDescription":{
"message":"Erase sensitive data from allowed CDN requests for improved privacy.",
"description":"Strip metadata description."
},
"whitelistedDomainsTitle":{
"message":"Исключить домены из проверки",
"description":"Whitelisted domains title."
},
"whitelistedDomainsDescription":{
"message":"«Белый список» доменов. Контент, расположенный на них не будет фильтроваться. Записи (при количестве более одной) разделяются точкой с запятой (;).",
"description":"Whitelisted domains description."
},
"advancedLabel":{
"message":"Дополнительно",
"description":"Advanced label."
}
}
\ No newline at end of file
{
"extensionDescription":{
"message":"Skyddar dig mot att spåras av \"gratis\", centraliserad, innehållsleverans.",
"description":"Extension description."
},
"disableProtectionTitle":{
"message":"Inaktivera skydd för den här sidan",
"description":"Disable protection title."
},
"enableProtectionTitle":{
"message":"Aktivera skydd",
"description":"Enable protection title."
},
"amountInjectedTitle":{
"message":"Räknare för lokalt insatta resurser",
"description":"Amount injected title."
},
"amountInjectedDescription":{
"message":"Antalet insatta Content Delivery Network-resurser sedan installationen.",
"description":"Amount injected description."
},
"optionsTitle":{
"message":"Inställningar",
"description":"Options title."
},
"showIconBadgeTitle":{
"message":"Visa insättningsantal på ikonen",
"description":"Show icon badge title."
},
"showIconBadgeDescription":{
"message":"Visa antalet insatta resurser på ikonen.",
"description":"Show icon badge description."
},
"blockMissingTitle":{
"message":"Blockera förfrågningar när resurs saknas",
"description":"Block requests for missing resources title."
},
"blockMissingDescription":{
"message":"Avbryt avlyssnad begäran om den begärda resursen inte finns lokalt.",
"description":"Block requests for missing resources description."
},
"disablePrefetchTitle":{
"message":"Inaktivera länkförhandshämtning",
"description":"Disable prefetch title."
},
"disablePrefetchDescription":{
"message":"Förhindra otillåtna förfrågningar från att läcka ut till leveransnätverk.",
"description":"Disable prefetch description."
},
"stripMetadataTitle":{
"message":"Skala bort metadata från tillåtna förfrågningar",
"description":"Strip metadata title."
},
"stripMetadataDescription":{
"message":"Radera känslig data från tillåtna CDN-förfrågningar för förbättrad integritet.",
"description":"Strip metadata description."
},
"whitelistedDomainsTitle":{
"message":"Exkludera domäner från inspektioner",
"description":"Whitelisted domains title."
},
"whitelistedDomainsDescription":{
"message":"Ange domäner för vitlistning. Separera flera domänposter med semikolon (;).",
"description":"Whitelisted domains description."
},
"advancedLabel":{
"message":"Avancerad",
"description":"Advanced label."
}
}
\ No newline at end of file
{
"extensionDescription":{
"message":"Sizi, \"ücretsiz\", merkezi, içerik dağıtımı aracılığıyla yapılan takipten korur.",
"description":"Extension description."
},
"disableProtectionTitle":{
"message":"Bu sitede korumayı devre dışı bırak",
"description":"Disable protection title."
},
"enableProtectionTitle":{
"message":"Korumayı etkinleştir",
"description":"Enable protection title."
},
"amountInjectedTitle":{
"message":"Yerel olarak eklenen kaynaklar için sayaç",
"description":"Amount injected title."
},
"amountInjectedDescription":{
"message":"Kurulumdan bu yana yerel İçerik Dağıtım Ağı kaynak eklemelerinin miktarı.",
"description":"Amount injected description."
},
"optionsTitle":{
"message":"Seçenekler",
"description":"Options title."
},
"showIconBadgeTitle":{
"message":"Simgede enjeksiyon sayaçlarını göster",
"description":"Show icon badge title."
},
"showIconBadgeDescription":{
"message":"Enjekte edilen kaynakların sayısını uzantı simgesinde gösterin.",
"description":"Show icon badge description."
},
"blockMissingTitle":{
"message":"Eksik kaynaklar için gelen istekleri engelle",
"description":"Block requests for missing resources title."
},
"blockMissingDescription":{
"message":"İstenilen kaynak yerel olarak mevcut değilse, yakalanan isteği iptal et.",
"description":"Block requests for missing resources description."
},
"disablePrefetchTitle":{
"message":"Bağlantı önalımını devre dışı bırak",
"description":"Disable prefetch title."
},
"disablePrefetchDescription":{
"message":"İzin verilmeyen isteklerin dağıtım ağlarına sızmasını engelleyin.",
"description":"Disable prefetch description."
},
"stripMetadataTitle":{
"message":"Meta verilerini izin verilen isteklerden ayır",
"description":"Strip metadata title."
},
"stripMetadataDescription":{
"message":"İzin verilen CDN isteklerine duyarlı verileri gelişmiş gizlilik için silin.",
"description":"Strip metadata description."
},
"whitelistedDomainsTitle":{
"message":"Alanları denetimlerden hariç tut",
"description":"Whitelisted domains title."
},
"whitelistedDomainsDescription":{
"message":"Beyaz listeye eklemek için alan adlarını girin. Birden çok girdiyi noktalı virgül (;) ile ayırın.",
"description":"Whitelisted domains description."
},
"advancedLabel":{
"message":"Gelişmiş",
"description":"Advanced label."
}
}
\ No newline at end of file
{
"extensionDescription":{
"message":"保护您免受集中式的内容交付网络(CDN)的跟踪。",
"description":"Extension description."
},
"disableProtectionTitle":{
"message":"在此网站上禁用保护",
"description":"Disable protection title."
},
"enableProtectionTitle":{
"message":"启用保护",
"description":"Enable protection title."
},
"amountInjectedTitle":{
"message":"本地发送资源的计数器",
"description":"Amount injected title."
},
"amountInjectedDescription":{
"message":"自安装以来,从本地的“内容交付网络”发送的资源总量。",
"description":"Amount injected description."
},
"optionsTitle":{
"message":"选项",
"description":"Options title."
},
"showIconBadgeTitle":{
"message":"在图标上显示注入数量",
"description":"Show icon badge title."
},
"showIconBadgeDescription":{
"message":"在扩展图标上显示已注入资源的数量。",
"description":"Show icon badge description."
},
"blockMissingTitle":{
"message":"阻止缺失资源的请求",
"description":"Block requests for missing resources title."
},
"blockMissingDescription":{
"message":"取消被拦截的请求,如果请求的资源在本地不可用。",
"description":"Block requests for missing resources description."
},
"disablePrefetchTitle":{
"message":"禁用链接预读取",
"description":"Disable prefetch title."
},
"disablePrefetchDescription":{
"message":"避免本应禁止的请求发到网络。",
"description":"Disable prefetch description."
},
"stripMetadataTitle":{
"message":"允许的请求剥去元数据",
"description":"Strip metadata title."
},
"stripMetadataDescription":{
"message":"被允许的 CDN 请求剥去敏感数据以保护隐私。",
"description":"Strip metadata description."
},
"whitelistedDomainsTitle":{
"message":"排除要检查的域名",
"description":"Whitelisted domains title."
},
"whitelistedDomainsDescription":{
"message":"输入白名单的域名。用分号 (;) 分隔多项。",
"description":"Whitelisted domains description."
},
"advancedLabel":{
"message":"高级",
"description":"Advanced label."
}
}
\ No newline at end of file
{
"extensionDescription":{
"message":"保護您不受「免費」、中心化的內容傳遞網路(CDN)的追蹤。",
"description":"Extension description."
},
"disableProtectionTitle":{
"message":"為此網站停用保護",
"description":"Disable protection title."
},
"enableProtectionTitle":{
"message":"啟用保護",
"description":"Enable protection title."
},
"amountInjectedTitle":{
"message":"由本機提供的資源計數器",
"description":"Amount injected title."
},
"amountInjectedDescription":{
"message":"安裝以來,由本機檔案所取代的 CDN 資源數量。",
"description":"Amount injected description."
},
"optionsTitle":{
"message":"選項",
"description":"Options title."
},
"showIconBadgeTitle":{
"message":"在圖示上顯示被取代的資源數量",
"description":"Show icon badge title."
},
"showIconBadgeDescription":{
"message":"在擴充套件圖示上,顯示被取代的資源數量。",
"description":"Show icon badge description."
},
"blockMissingTitle":{
"message":"封鎖缺少資源時的連線請求",
"description":"Block requests for missing resources title."
},
"blockMissingDescription":{
"message":"若本機沒有所請求的資源,就取消該請求。",
"description":"Block requests for missing resources description."
},
"disablePrefetchTitle":{
"message":"停用連結預讀功能",
"description":"Disable prefetch title."
},
"disablePrefetchDescription":{
"message":"防止發出不被允許的請求到 CDN 網路。",
"description":"Disable prefetch description."
},
"stripMetadataTitle":{
"message":"移除放行請求當中的後設資料",
"description":"Strip metadata title."
},
"stripMetadataDescription":{
"message":"清除放行的 CDN 請求當中的敏感資料,以保護隱私權。",
"description":"Strip metadata description."
},
"whitelistedDomainsTitle":{
"message":"要排除檢查的網域",
"description":"Whitelisted domains title."
},
"whitelistedDomainsDescription":{
"message":"輸入網域即可將其加入白名單。使用分號(;)分隔多個網域。",
"description":"Whitelisted domains description."
},
"advancedLabel":{
"message":"進階",
"description":"Advanced label."
}
}
\ No newline at end of file
Introduction
------------
This audit script allows any user and extension reviewer to verify the integrity of the bundled resources. It automatically, and transparently, compares all bundled libraries to their original sources.
Usage Instructions (Unix)
------------------
1. Make sure you have Node.js installed on your machine.
2. Open up a terminal and ```cd``` into this directory.
3. Execute ```npm install``` to fetch any dependencies.
4. Run the audit script by executing ```node run```.
**Note:** If you'd like to save the report, run ```node run > report.txt```.
\ No newline at end of file
{
"name": "decentraleyes-audit",
"version": "1.5.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
"source-map-url": {
"version": "0.4.0",
"resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.0.tgz",
"integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM="
}
}
}
{
"name": "decentraleyes-audit",
"version": "1.4.0",
"version": "1.5.0",
"author": "Thomas Rientjes",
"license": "MPL-2.0",
"description": "Library audit tool for Decentraleyes.",
......
......@@ -31,6 +31,7 @@ sourceMappingURL = require('source-map-url');
var localResourceLocation = '../resources';
var localResourceLocationLength = localResourceLocation.length;
var localResourcePaths = [];
var comparedResourceAmount = 0;
var resourceAmount = 0;
/**
......@@ -41,10 +42,6 @@ function _fetchLocalResourcePaths(folderPath) {
fileSystem.readdirSync(folderPath).forEach(function (resourceName) {
if (resourceName === '_audit') {
return localResourcePaths;
}
var resourcePath = folderPath + '/' + resourceName;
var resourceStatistics = fileSystem.statSync(resourcePath);
......@@ -75,7 +72,7 @@ function _getLocalResourceContents(fileLocation, callback) {
var localFileContents = buffer.toString('utf8', 0, buffer.length);
fileSystem.close(fileDescriptor);
fileSystem.close(fileDescriptor, function () {});
callback(localFileContents);
});
});
......@@ -156,9 +153,6 @@ function _compareResources(localResourceContents, remoteResourceContents, URL) {
sourceMappingNotice = '[X] REMOTE RESOURCE HAD SOURCE MAPPING URL';
}
// Remove the syntax invalidation character from the local contents.
localResourceContents = localResourceContents.substring(1);
var localResourceHash = _hashFileContents(localResourceContents);
var remoteResourceHash = _hashFileContents(remoteResourceContents);
......@@ -176,6 +170,8 @@ function _compareResources(localResourceContents, remoteResourceContents, URL) {
console.log();
console.log('[X] LOCAL AND REMOTE RESOURCE HASHES MATCH');
console.log(sourceMappingNotice);
_incrementComparedResourceAmount();
}
function _showCompletedMessage() {
......@@ -186,6 +182,18 @@ function _showCompletedMessage() {
console.log();
}
function _incrementComparedResourceAmount() {
comparedResourceAmount++;
if (comparedResourceAmount === resourceAmount) {
setTimeout(function () {
_showCompletedMessage();
}, 500);
}
}
/**
* Initializations
*/
......@@ -215,13 +223,6 @@ localResourcePaths.forEach(function (resourcePath, index) {
console.log();
console.log('------------------------------------------');
if (index === resourceAmount - 1) {
setTimeout(function () {
_showCompletedMessage();
}, 500);
}
});
});
......
locale decentraleyes bg locale/bg/
locale decentraleyes da locale/da/
locale decentraleyes de locale/de/
locale decentraleyes en-GB locale/en-GB/
locale decentraleyes en-US locale/en-US/
locale decentraleyes eo locale/eo/
locale decentraleyes es locale/es/
locale decentraleyes fi locale/fi/
locale decentraleyes fr locale/fr/
locale decentraleyes id locale/id/
locale decentraleyes it locale/it/
locale decentraleyes ja locale/ja/
locale decentraleyes nl locale/nl/
locale decentraleyes pl locale/pl/
locale decentraleyes pt-PT locale/pt-PT/
locale decentraleyes ru locale/ru/
locale decentraleyes sv-SE locale/sv-SE/
locale decentraleyes zh-CN locale/zh-CN/
locale decentraleyes zh-TW locale/zh-TW/
......@@ -260,9 +260,3 @@ var files = {
'resources/webfont/1.5.10/webfont.js.dec': true,
'resources/webfont/1.5.18/webfont.js.dec': true
};
/**
* Exports
*/
module.exports = files;
/**
* Interceptor
* Belongs to Decentraleyes.
*
* @author Thomas Rientjes
* @since 2016-04-06
* @license MPL 2.0
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/.
*/
'use strict';
/**
* Interceptor
*/
var interceptor = {};
/**
* Constants
*/
const HTTP_EXPRESSION = /^http?:\/\//;
/**
* Public Methods
*/
interceptor.handleRequest = function (requestDetails, tabIdentifier, tab) {
let validCandidate, tabDomain, targetDetails, targetPath;
validCandidate = requestAnalyzer.isValidCandidate(requestDetails, tab);
if (!validCandidate) {
return {
'cancel': false
};
}
try {
tabDomain = tab.url.match(WEB_DOMAIN_EXPRESSION)[1];
tabDomain = requestAnalyzer._normalizeDomain(tabDomain);
} catch (exception) {
tabDomain = 'example.org';
}
// Temporary list of undetectable tainted domains.
let undetectableTaintedDomains = {
'cdnjs.com': true,
'dropbox.com': true,
'minigames.mail.ru': true,
'report-uri.io': true,
'securityheaders.io': true,
'stefansundin.github.io': true,
'udacity.com': true
};
if (undetectableTaintedDomains[tabDomain] || /yandex\./.test(tabDomain)) {
if (tabDomain !== 'yandex.ru') {
return interceptor._handleMissingCandidate(requestDetails.url);
}
}
targetDetails = requestAnalyzer.getLocalTarget(requestDetails);
targetPath = targetDetails.path;
if (!targetPath) {
return interceptor._handleMissingCandidate(requestDetails.url);
}
if (!files[targetPath]) {
return interceptor._handleMissingCandidate(requestDetails.url);
}
stateManager.requests[requestDetails.requestId] = {
'tabIdentifier': tabIdentifier,
'targetDetails': targetDetails
};
return {
'redirectUrl': chrome.extension.getURL(targetPath)
};
};
/**
* Private Methods
*/
interceptor._handleMissingCandidate = function (requestUrl) {
if (interceptor.blockMissing === true) {
return {
'cancel': true
};
}
if (requestUrl.match(HTTP_EXPRESSION)) {
requestUrl = requestUrl.replace(HTTP_EXPRESSION, 'https://');
return {
'redirectUrl': requestUrl
};
} else {
return {
'cancel': false
};
}
};
interceptor._handleStorageChanged = function (changes) {
if ('blockMissing' in changes) {
interceptor.blockMissing = changes.blockMissing.newValue;
}
};
/**
* Initializations
*/
interceptor.amountInjected = 0;
interceptor.blockMissing = false;
chrome.storage.local.get(['amountInjected', 'blockMissing'], function (items) {
interceptor.amountInjected = items.amountInjected || 0;
interceptor.blockMissing = items.blockMissing || false;
});
/**
* Event Handlers
*/
chrome.storage.onChanged.addListener(interceptor._handleStorageChanged);
/**
* Entry Point
* Belongs to Decentraleyes.
*
* @author Thomas Rientjes
* @since 2016-04-04
* @license MPL-2.0
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/.
*/
'use strict';
/**
* Main
*/
var main = {};
/**
* Private Methods
*/
main._initializeOptions = function () {
let optionDefaults = {
'showIconBadge': true,
'blockMissing': false,
'disablePrefetch': true,
'stripMetadata': true,
'whitelistedDomains': {}
};
chrome.storage.local.get(optionDefaults, function (options) {
if (options === null) {
options = optionDefaults;
}
if (options.disablePrefetch !== false) {
chrome.privacy.network.networkPredictionEnabled.set({
'value': false
});
}
chrome.storage.local.set(options);
});
};
main._showReleaseNotes = function (details) {
let location = chrome.extension.getURL('pages/welcome/welcome.html');
if (details.reason === 'install' || details.reason === 'update') {
if (details.temporary !== true) {
chrome.storage.local.get({
'showReleaseNotes': true
}, function (options) {
if (options.showReleaseNotes === true) {
chrome.tabs.create({
'url': location,
'active': false
});
}
});
}
}
};
/**
* Initializations
*/
chrome.runtime.onInstalled.addListener(main._showReleaseNotes);
main._initializeOptions();
chrome.browserAction.setBadgeBackgroundColor({
'color': [74, 130, 108, 255]
});
......@@ -13,12 +13,6 @@
'use strict';
/**
* Imports
*/
var resources = require('./resources');
/**
* Mappings
*/
......@@ -50,62 +44,6 @@ var mappings = {
path: 'resources/jquery/1.11.1/jquery.min.js.dec',
type: 'application/javascript'
},
'jquery/1.2/jquery.min.js': {
path: 'resources/jquery/1.2.6/jquery.min.js.dec',
type: 'application/javascript'
},
'jquery/1.2/jquery.js': {
path: 'resources/jquery/1.2.6/jquery.min.js.dec',
type: 'application/javascript'
},
'jquery/1.3/jquery.min.js': {
path: 'resources/jquery/1.3.2/jquery.min.js.dec',
type: 'application/javascript'
},
'jquery/1.3/jquery.js': {
path: 'resources/jquery/1.3.2/jquery.min.js.dec',
type: 'application/javascript'
},
'jquery/1.4/jquery.min.js': {
path: 'resources/jquery/1.4.4/jquery.min.js.dec',
type: 'application/javascript'
},
'jquery/1.4/jquery.js': {
path: 'resources/jquery/1.4.4/jquery.min.js.dec',
type: 'application/javascript'
},
'jquery/1.5/jquery.min.js': {
path: 'resources/jquery/1.5.2/jquery.min.js.dec',
type: 'application/javascript'
},
'jquery/1.5/jquery.js': {
path: 'resources/jquery/1.5.2/jquery.min.js.dec',
type: 'application/javascript'
},
'jquery/1.6/jquery.min.js': {
path: 'resources/jquery/1.6.4/jquery.min.js.dec',
type: 'application/javascript'
},
'jquery/1.6/jquery.js': {
path: 'resources/jquery/1.6.4/jquery.min.js.dec',
type: 'application/javascript'
},
'jquery/1.7/jquery.min.js': {
path: 'resources/jquery/1.7.2/jquery.min.js.dec',
type: 'application/javascript'
},
'jquery/1.7/jquery.js': {
path: 'resources/jquery/1.7.2/jquery.min.js.dec',
type: 'application/javascript'
},
'jquery/1.8/jquery.min.js': {
path: 'resources/jquery/1.8.3/jquery.min.js.dec',
type: 'application/javascript'
},
'jquery/1.8/jquery.js': {
path: 'resources/jquery/1.8.3/jquery.min.js.dec',
type: 'application/javascript'
},
'jqueryui/1/jquery-ui.js': {
path: 'resources/jqueryui/1.10.4/jquery-ui.min.js.dec',
type: 'application/javascript'
......@@ -139,7 +77,6 @@ var mappings = {
// Microsoft Ajax CDN
'ajax.aspnetcdn.com': {
'/ajax/': {
'jQuery/jquery-{version}.': resources.jQuery,
'jquery/jquery-{version}.': resources.jQuery,
'modernizr/modernizr-{version}.': resources.modernizr
}
......@@ -147,7 +84,6 @@ var mappings = {
// Microsoft Ajax CDN [Deprecated]
'ajax.microsoft.com': {
'/ajax/': {
'jQuery/jquery-{version}.': resources.jQuery,
'jquery/jquery-{version}.': resources.jQuery,
'modernizr/modernizr-{version}.': resources.modernizr
}
......@@ -341,9 +277,3 @@ var mappings = {
}
}
};
/**
* Exports
*/
module.exports = mappings;
......@@ -3,7 +3,7 @@
* Belongs to Decentraleyes.
*
* @author Thomas Rientjes
* @since 2014-05-30
* @since 2016-04-11
* @license MPL 2.0
*
* This Source Code Form is subject to the terms of the Mozilla Public
......@@ -14,92 +14,60 @@
'use strict';
/**
* Imports
*/
/**
* Resource version mappings.
* @var {object} mappings
* Request Analyzer
*/
var mappings = require('./mappings');
/**
* Gets and sets add-on specific preferences.
* @var {object} simplePreferences
*/
var simplePreferences = require('sdk/simple-prefs');
var requestAnalyzer = {};
/**
* Constants
*/
const MAPPING_FILE_EXPRESSION = new RegExp('.map$', 'i');
const MAPPING_FILE_EXPRESSION = new RegExp('\.map$', 'i');
const VERSION_EXPRESSION = /(?:\d{1,2}\.){1,3}\d{1,2}/;
const VERSION_PLACEHOLDER = '{version}';
const WEB_DOMAIN_EXPRESSION = /:\/\/(.[^\/]+)(.*)/;
const WEB_PREFIX_VALUE = 'www.';
const WEB_PREFIX_LENGTH = WEB_PREFIX_VALUE.length;
const VALUE_SEPARATOR = ';';
/**
* Variables
*/
var preferences = simplePreferences.prefs;
var whitelistedDomains = {};
/**
* Initializations
*/
_applyWhitelistPreference();
/**
* Event Handlers
*/
simplePreferences.on('domainWhitelist', _applyWhitelistPreference);
/**
* Public Methods
*/
exports.isValidCandidate = function (httpChannel) {
// See if the request is targeted at a Content Delivery Network.
if (mappings[httpChannel.URI.host] === undefined) {
return false;
}
requestAnalyzer.isValidCandidate = function (requestDetails, tabDetails) {
// Attempt to determine the domain of the request initiator.
var initiatorDomain =
httpChannel.loadInfo && httpChannel.loadInfo.loadingDocument && httpChannel.loadInfo.loadingDocument.domain ||
httpChannel.referrer && httpChannel.referrer.host;
let initiatorHost;
// If the request initiator could be determined and is whitelisted.
if (initiatorDomain && whitelistedDomains[_normalizeDomain(initiatorDomain)]) {
try {
initiatorHost = tabDetails.url.match(WEB_DOMAIN_EXPRESSION)[1];
} catch (exception) {
initiatorHost = 'example.org';
}
// Remove referer header from request.
httpChannel.setRequestHeader('Referer', null, false);
if (initiatorHost && requestAnalyzer.whitelistedDomains[requestAnalyzer._normalizeDomain(initiatorHost)]) {
return false;
}
// Only requests of type GET can be valid candidates.
return httpChannel.requestMethod === 'GET';
return requestDetails.method === 'GET';
};
exports.getLocalTarget = function (channelHost, channelPath) {
requestAnalyzer.getLocalTarget = function (requestDetails) {
var hostMappings, basePath, resourceMappings;
let destinationHost, destinationPath, hostMappings, basePath, resourceMappings;
destinationHost = requestDetails.url.match(WEB_DOMAIN_EXPRESSION)[1];
destinationPath = requestDetails.url.match(WEB_DOMAIN_EXPRESSION)[2];
// Use the proper mappings for the targeted host.
hostMappings = mappings[channelHost];
hostMappings = mappings[destinationHost];
// Resource mapping files are never locally available.
if (MAPPING_FILE_EXPRESSION.test(channelPath)) {
if (MAPPING_FILE_EXPRESSION.test(destinationPath)) {
return false;
}
basePath = _matchBasePath(hostMappings, channelPath);
basePath = requestAnalyzer._matchBasePath(hostMappings, destinationPath);
resourceMappings = hostMappings[basePath];
if (!resourceMappings) {
......@@ -107,14 +75,14 @@ exports.getLocalTarget = function (channelHost, channelPath) {
}
// Return either the local target's path or false.
return _findLocalTarget(resourceMappings, basePath, channelPath);
return requestAnalyzer._findLocalTarget(resourceMappings, basePath, destinationHost, destinationPath);
};
/**
* Private Methods
*/
function _matchBasePath(hostMappings, channelPath) {
requestAnalyzer._matchBasePath = function (hostMappings, channelPath) {
for (let basePath of Object.keys(hostMappings)) {
......@@ -124,9 +92,9 @@ function _matchBasePath(hostMappings, channelPath) {
}
return false;
}
};
function _findLocalTarget(resourceMappings, basePath, channelPath) {
requestAnalyzer._findLocalTarget = function (resourceMappings, basePath, channelHost, channelPath) {
var resourcePath, versionNumber, resourcePattern;
......@@ -135,33 +103,38 @@ function _findLocalTarget(resourceMappings, basePath, channelPath) {
versionNumber = resourcePath.match(VERSION_EXPRESSION);
resourcePattern = resourcePath.replace(versionNumber, VERSION_PLACEHOLDER);
// Determine if the resource path has a static mapping.
if (resourceMappings[resourcePath]) {
// Prepare and return a local target.
return {
path: resourceMappings[resourcePath].path,
type: resourceMappings[resourcePath].type
};
}
// Determine if the resource path fits into a resource mold.
for (let resourceMold of Object.keys(resourceMappings)) {
if (resourcePattern.startsWith(resourceMold)) {
let targetPath, version;
targetPath = resourceMappings[resourceMold].path;
targetPath = targetPath.replace(VERSION_PLACEHOLDER, versionNumber);
version = versionNumber && versionNumber[0] || targetPath.match(VERSION_EXPRESSION);
// Prepare and return a local target.
return {
path: resourceMappings[resourceMold].path.replace(VERSION_PLACEHOLDER, versionNumber),
type: resourceMappings[resourceMold].type
source: channelHost,
version: version,
path: targetPath
};
}
}
return false;
}
};
requestAnalyzer._applyWhitelistedDomains = function () {
//noinspection JSUnresolvedVariable
chrome.storage.local.get('whitelistedDomains', function (items) {
requestAnalyzer.whitelistedDomains = items.whitelistedDomains || {};
});
};
function _normalizeDomain(domain) {
requestAnalyzer._normalizeDomain = function (domain) {
domain = domain.toLowerCase().trim();
......@@ -170,14 +143,17 @@ function _normalizeDomain(domain) {
}
return domain;
}
};
/**
* Initializations
*/
function _applyWhitelistPreference() {
requestAnalyzer.whitelistedDomains = {};
requestAnalyzer._applyWhitelistedDomains();
whitelistedDomains = {};
/**
* Event Handlers
*/
//noinspection JSUnresolvedVariable
preferences.domainWhitelist.split(VALUE_SEPARATOR).forEach(function (domain) {
whitelistedDomains[_normalizeDomain(domain)] = true;
});
}
chrome.storage.onChanged.addListener(requestAnalyzer._applyWhitelistedDomains);