kiến thức Tổng hợp những addon chất cho Firefox / Chromium

Em đang dùng FF lướt qua qua mà cảm tưởng đã thích hơn Brave rồi ? :D
FF giờ khác với thời xa xưa em dùng quá haha
Có cái tối ưu cuộn chuột này có thể khiến cảm giác khi lướt web mượt hơn:
  • Tối ưu cuộn mượt (chú ý giá trị mousewheel.default.delta_multiplier_y có thể chỉnh tùy ý, mỗi cá nhân sẽ có một con số phù hợp vì cuộn mượt hay không cảm nhận rất quan trọng)
Tùy từng người sẽ thích apz.overscroll.enabledfalse để khi cuộn tới cuối hay đầu trang không nảy tưng tưng.

Điểm yếu nhất của Firefox hiện tại theo mình là Youtube và định dạng video AV1, nên một mẹo nhỏ là nên cài cái AV1 Extension của Microsoft (Edge cũng phải tự cài) để xem được video ở độ phân giải cao, cơ mà cá nhân mình thích xem ở MPV hơn (tham khảo mục External Application ở #1) vì hiệu năng tốt nhất và bỏ qua 100% quảng cáo, không sợ Google chơi bài chặn account không cho xem do chặn quảng cáo, và đương nhiên MPV hỗ trợ AV1 tốt hơn mọi trình duyệt web.

Và một thói quen tốt mỗi khi thấy quảng cáo là:
Nếu quảng cáo vẫn còn thì có thể báo cho phía uBlock biết hay vào đây bàn luận tìm cách trị: https://github.com/uBlockOrigin/uBlock-issues/issues
 
Tổng hợp tất cả tối ưu tốt nhất của thread trong một file user.js, cách sử dụng:
  • about:support
  • Open Profile Folder
  • Tạo một file user.js mở lên và copy toàn bộ phần dưới vào trong và save lại
  • Khởi động lại Firefox

Chú ý: Phần ép cache chạy trên RAM mình không bật mặc định, các bạn muốn bật thì bỏ // ở phần dưới của // Force RAM cache, uncomment // to enable để bật nhé.

Và thế là xong, chỉ một file user.js chứa tất cả tinh hoa bao đời nay của người dùng Firefox và của thread, thao tác chưa tới vài giây là xong.

Code:
// Reduce disk read/write
user_pref("browser.sessionstore.idleDelay", 3600000);
user_pref("browser.sessionstore.interval", 3600000);
user_pref("browser.sessionstore.collect_zoom", false);
user_pref("browser.sessionstore.privacy_level", 2);
user_pref("browser.sessionstore.restore_pinned_tabs_on_demand", true);
user_pref("browser.sessionhistory.max_total_viewers", 0);

// Disable Pocket and Accessibility
user_pref("extensions.pocket.enabled", false);
user_pref("accessibility.force_disabled", 1);

// Optimize rendering speed
// https://voz.vn/t/tong-hop-nhung-addon-chat-cho-firefox-pc-mobile.682181/post-23570551
// https://voz.vn/t/tong-hop-nhung-addon-chat-cho-firefox-pc-mobile.682181/post-27064564
user_pref("nglayout.initialpaint.delay", 2000);
user_pref("nglayout.initialpaint.delay_in_oopif", 2000);
//user_pref("content.notify.backoffcount", 0);
//user_pref("content.notify.interval", 2000000);
//user_pref("content.notify.ontimer", true);

// Enable punycode
// https://voz.vn/t/tong-hop-nhung-addon-chat-cho-firefox-pc-mobile.682181/post-25938099
user_pref("network.IDN_show_punycode", true);

// GoogleDNS + ECS
// https://voz.vn/t/tong-hop-nhung-addon-chat-cho-firefox-pc-mobile.682181/post-24688026
user_pref("network.trr.uri", "https://dns.google/dns-query");
user_pref("network.trr.custom_uri", "https://dns.google/dns-query");
user_pref("network.trr.mode", 2);
user_pref("network.trr.disable-ECS", false);

// Reduce network request
// https://voz.vn/t/tong-hop-nhung-addon-chat-cho-firefox-pc-mobile.682181/post-27409530
user_pref("network.http.rcwn.enabled", false);

// Force RAM cache, uncomment // to enable
// https://voz.vn/t/cach-ep-firefox-luu-cache-tren-ram-ma-khong-can-ramdisk.664955/
//user_pref("browser.cache.disk.enable", false);
//user_pref("browser.cache.memory.enable", true);
//user_pref("browser.cache.memory.capacity", 524288);
//user_pref("browser.cache.memory.max_entry_size", 512000);

// Enable Multi-Account Container
user_pref("privacy.userContext.enabled", true); //enable Multi-Account Container
user_pref("privacy.userContext.ui.enabled", true); //enable Multi-Account Container

/*** [SECTION 0200]: GEOLOCATION / LANGUAGE / LOCALE ***/
user_pref("_user.js.parrot", "0200 syntax error: the parrot's definitely deceased!");
/* 0201: use Mozilla geolocation service instead of Google if permission is granted [FF74+]
 * Optionally enable logging to the console (defaults to false) ***/
user_pref("geo.provider.network.url", "https://location.services.mozilla.com/v1/geolocate?key=%MOZILLA_API_KEY%");
   // user_pref("geo.provider.network.logging.enabled", true); // [HIDDEN PREF]
/* 0202: disable using the OS's geolocation service ***/
user_pref("geo.provider.ms-windows-location", false); // [WINDOWS]
user_pref("geo.provider.use_corelocation", false); // [MAC]
user_pref("geo.provider.use_gpsd", false); // [LINUX]
user_pref("geo.provider.use_geoclue", false); // [FF102+] [LINUX]

/*** [SECTION 0300]: QUIETER FOX ***/
user_pref("_user.js.parrot", "0300 syntax error: the parrot's not pinin' for the fjords!");
/** RECOMMENDATIONS ***/
/* 0320: disable recommendation pane in about:addons (uses Google Analytics) ***/
user_pref("extensions.getAddons.showPane", false); // [HIDDEN PREF]
/* 0321: disable recommendations in about:addons' Extensions and Themes panes [FF68+] ***/
user_pref("extensions.htmlaboutaddons.recommendations.enabled", false);
/* 0322: disable personalized Extension Recommendations in about:addons and AMO [FF65+]
 * [NOTE] This pref has no effect when Health Reports (0331) are disabled
 * [SETTING] Privacy & Security>Firefox Data Collection & Use>Allow Firefox to make personalized extension recommendations
 * [1] https://support.mozilla.org/kb/personalized-extension-recommendations ***/
user_pref("browser.discovery.enabled", false);

/** TELEMETRY ***/
/* 0330: disable new data submission [FF41+]
 * If disabled, no policy is shown or upload takes place, ever
 * [1] https://bugzilla.mozilla.org/1195552 ***/
user_pref("datareporting.policy.dataSubmissionEnabled", false);
/* 0331: disable Health Reports
 * [SETTING] Privacy & Security>Firefox Data Collection & Use>Allow Firefox to send technical... data ***/
user_pref("datareporting.healthreport.uploadEnabled", false);
/* 0332: disable telemetry
 * The "unified" pref affects the behavior of the "enabled" pref
 * - If "unified" is false then "enabled" controls the telemetry module
 * - If "unified" is true then "enabled" only controls whether to record extended data
 * [NOTE] "toolkit.telemetry.enabled" is now LOCKED to reflect prerelease (true) or release builds (false) [2]
 * [1] https://firefox-source-docs.mozilla.org/toolkit/components/telemetry/telemetry/internals/preferences.html
 * [2] https://medium.com/georg-fritzsche/data-preference-changes-in-firefox-58-2d5df9c428b5 ***/
user_pref("toolkit.telemetry.unified", false);
user_pref("toolkit.telemetry.enabled", false); // see [NOTE]
user_pref("toolkit.telemetry.server", "data:,");
user_pref("toolkit.telemetry.archive.enabled", false);
user_pref("toolkit.telemetry.newProfilePing.enabled", false); // [FF55+]
user_pref("toolkit.telemetry.shutdownPingSender.enabled", false); // [FF55+]
user_pref("toolkit.telemetry.updatePing.enabled", false); // [FF56+]
user_pref("toolkit.telemetry.bhrPing.enabled", false); // [FF57+] Background Hang Reporter
user_pref("toolkit.telemetry.firstShutdownPing.enabled", false); // [FF57+]
/* 0333: disable Telemetry Coverage
 * [1] https://blog.mozilla.org/data/2018/08/20/effectively-measuring-search-in-firefox/ ***/
user_pref("toolkit.telemetry.coverage.opt-out", true); // [HIDDEN PREF]
user_pref("toolkit.coverage.opt-out", true); // [FF64+] [HIDDEN PREF]
user_pref("toolkit.coverage.endpoint.base", "");
/* 0334: disable PingCentre telemetry (used in several System Add-ons) [FF57+]
 * Defense-in-depth: currently covered by 0331 ***/
user_pref("browser.ping-centre.telemetry", false);
/* 0335: disable Firefox Home (Activity Stream) telemetry ***/
user_pref("browser.newtabpage.activity-stream.feeds.telemetry", false);
user_pref("browser.newtabpage.activity-stream.telemetry", false);

/** STUDIES ***/
/* 0340: disable Studies
 * [SETTING] Privacy & Security>Firefox Data Collection & Use>Allow Firefox to install and run studies ***/
user_pref("app.shield.optoutstudies.enabled", false);
/* 0341: disable Normandy/Shield [FF60+]
 * Shield is a telemetry system that can push and test "recipes"
 * [1] https://mozilla.github.io/normandy/ ***/
user_pref("app.normandy.enabled", false);
user_pref("app.normandy.api_url", "");

/** CRASH REPORTS ***/
/* 0350: disable Crash Reports ***/
user_pref("breakpad.reportURL", "");
user_pref("browser.tabs.crashReporting.sendReport", false); // [FF44+]
   // user_pref("browser.crashReports.unsubmittedCheck.enabled", false); // [FF51+] [DEFAULT: false]
/* 0351: enforce no submission of backlogged Crash Reports [FF58+]
 * [SETTING] Privacy & Security>Firefox Data Collection & Use>Allow Firefox to send backlogged crash reports  ***/
user_pref("browser.crashReports.unsubmittedCheck.autoSubmit2", false); // [DEFAULT: false]

/** OTHER ***/
/* 0360: disable Captive Portal detection
 * [1] https://www.eff.org/deeplinks/2017/08/how-captive-portals-interfere-wireless-security-and-privacy ***/
user_pref("captivedetect.canonicalURL", "");
user_pref("network.captive-portal-service.enabled", false); // [FF52+]
/* 0361: disable Network Connectivity checks [FF65+]
 * [1] https://bugzilla.mozilla.org/1460537 ***/
user_pref("network.connectivity-service.enabled", false);

/*** [SECTION 0400]: SAFE BROWSING (SB)
   SB has taken many steps to preserve privacy. If required, a full url is never sent
   to Google, only a part-hash of the prefix, hidden with noise of other real part-hashes.
   Firefox takes measures such as stripping out identifying parameters and since SBv4 (FF57+)
   doesn't even use cookies. (#Turn on browser.safebrowsing.debug to monitor this activity)

   [1] https://feeding.cloud.geek.nz/posts/how-safe-browsing-works-in-firefox/
   [2] https://wiki.mozilla.org/Security/Safe_Browsing
   [3] https://support.mozilla.org/kb/how-does-phishing-and-malware-protection-work
   [4] https://educatedguesswork.org/posts/safe-browsing-privacy/
***/
user_pref("_user.js.parrot", "0400 syntax error: the parrot's passed on!");
/* 0401: disable SB (Safe Browsing)
 * [WARNING] Do this at your own risk! These are the master switches
 * [SETTING] Privacy & Security>Security>... Block dangerous and deceptive content ***/
   // user_pref("browser.safebrowsing.malware.enabled", false);
   // user_pref("browser.safebrowsing.phishing.enabled", false);
/* 0402: disable SB checks for downloads (both local lookups + remote)
 * This is the master switch for the safebrowsing.downloads* prefs (0403, 0404)
 * [SETTING] Privacy & Security>Security>... "Block dangerous downloads" ***/
   // user_pref("browser.safebrowsing.downloads.enabled", false);
/* 0403: disable SB checks for downloads (remote)
 * To verify the safety of certain executable files, Firefox may submit some information about the
 * file, including the name, origin, size and a cryptographic hash of the contents, to the Google
 * Safe Browsing service which helps Firefox determine whether or not the file should be blocked
 * [SETUP-SECURITY] If you do not understand this, or you want this protection, then override this ***/
user_pref("browser.safebrowsing.downloads.remote.enabled", false);
   // user_pref("browser.safebrowsing.downloads.remote.url", ""); // Defense-in-depth
/* 0404: disable SB checks for unwanted software
 * [SETTING] Privacy & Security>Security>... "Warn you about unwanted and uncommon software" ***/
   // user_pref("browser.safebrowsing.downloads.remote.block_potentially_unwanted", false);
   // user_pref("browser.safebrowsing.downloads.remote.block_uncommon", false);
/* 0405: disable "ignore this warning" on SB warnings [FF45+]
 * If clicked, it bypasses the block for that session. This is a means for admins to enforce SB
 * [TEST] see https://github.com/arkenfox/user.js/wiki/Appendix-A-Test-Sites#-mozilla
 * [1] https://bugzilla.mozilla.org/1226490 ***/
   // user_pref("browser.safebrowsing.allowOverride", false);
Nếu em làm theo cách này cho nhanh thì có oke ko bác? có bị ảnh hưởng gì tới trải nghiệm ko ah
 
Nếu em làm theo cách này cho nhanh thì có oke ko bác? có bị ảnh hưởng gì tới trải nghiệm ko ah
nó là những config tối ưu thôi bác, không gây ảnh hưởng trải nhiệm mấy đâu, nếu bác không quan tâm lắm đến cache thì chẳng có gì phải lăn tăn cả
 
Miêu vào
Code:
about:processes
thì thấy mục Extensions này sài tận 2Gb
1693883502131.png

Có cách nào kiểm tra xem cái Extension nào đăng ăn memory không các fen ?
3xqaOBL.gif

Edit: Đã tìm được
Code:
about:memory#start1
 
Last edited:
Miêu vào
Code:
about:processes
thì thấy mục Extensions này sài tận 2Gb
View attachment 2053679
Có cách nào kiểm tra xem cái Extension nào đăng ăn memory không các fen ?
3xqaOBL.gif

Edit: Đã tìm được
Code:
about:memory#start1
Thủ phạm là thằng nào mà kinh khủng vậy, nhìn chung kết hợp giữa about:memoryabout:debugging sẽ ra được kết quả, trước có about:performance ngon hơn mà mấy thằng dev thiểu năng xóa mất.

Cơ mà dùng Floorp vẫn còn about:performance nhé, 116 mới là xóa mất :D
 
Miêu vào
Code:
about:processes
thì thấy mục Extensions này sài tận 2Gb
View attachment 2053679
Có cách nào kiểm tra xem cái Extension nào đăng ăn memory không các fen ?
3xqaOBL.gif

Edit: Đã tìm được
Code:
about:memory#start1
Mấy cái này FF làm lộn xộn vãi
  • Shift + ESC mở Task Manger thì mở ra là Process Manager
  • Task Manager hiện tại là about:performance ※ Do xài tete009 115 nên vẫn còn
  • Rồi muốn coi chi tiết trong Process Manager lại cần phải coi about:memory about:debugging
6hGcW85.gif
2avLY9u.gif
 
Chỉnh thì chắc chắn được vì Floorp chính là Firefox+(Edge+Opera), còn cần thiết hay không thì khó nói, các tinh chỉnh trên là để tăng tốc Firefox thôi chứ không làm gì nhiều, cứ áp đại dùng thử một thời gian nếu không thích thì xóa đi thôi, mình có chia sẻ script xóa user.js (dùng file bat này khôi phục về như cũ), mọi thứ sẽ trở về như chưa từng có cuộc chia ly.
 
Cái thằng floorp này gc nó không hoạt động hay là firefox bị vậy fen @toi la gay :sosad: ? Miêu sài 1 thời gian thấy nó ăn hơn 4Gb ram vào about:memory bấm nút "Minimize memory usage" thì thấy memory giật về 1.8Gb -> 2Gb
2cB5cqV.gif
2cB5cqV.gif
2cB5cqV.gif
 
Cái thằng floorp này gc nó không hoạt động hay là firefox bị vậy fen @toi la gay :sosad: ? Miêu sài 1 thời gian thấy nó ăn hơn 4Gb ram vào about:memory bấm nút "Minimize memory usage" thì thấy memory giật về 1.8Gb -> 2Gb
2cB5cqV.gif
2cB5cqV.gif
2cB5cqV.gif
Bật Sleeping Tab xem sao, của mình bật lâu lắm rồi và mở (
1693888927183.png
) thấy có ngần này, trình duyệt dạng multi-process thường có GC tốt vì nó tắt tab là nó xóa toàn bộ nội dung tab khỏi RAM:
1693888728124.png


Có thể cái RAM phồng ra là do ép Firefox cache trên RAM nhé, nếu vậy cái fioorp.exe cao nhất trên đỉnh nó sẽ phồng ra để lưu trên RAM thôi, có thể giảm bớt đi thành tầm 512MB.
 
Bật Sleeping Tab xem sao, của mình bật lâu lắm rồi và mở (View attachment 2053884) thấy có ngần này, trình duyệt dạng multi-process thường có GC tốt vì nó tắt tab là nó xóa toàn bộ nội dung tab khỏi RAM:

Có thể cái RAM phồng ra là do ép Firefox cache trên RAM nhé, nếu vậy cái fioorp.exe cao nhất trên đỉnh nó sẽ phồng ra để lưu trên RAM thôi, có thể giảm bớt đi thành tầm 512MB.
1693889083176.png

Chẳng biết thằng nào đúng nữa. Nhưng Miêu bấm như ở trên nói thì mỗi lần bấm nó sẽ giảm cho 500-1Gb
Q3OGEPn.gif
 
View attachment 2053894
Chẳng biết thằng nào đúng nữa. Nhưng Miêu bấm như ở trên nói thì mỗi lần bấm nó sẽ giảm cho 500-1Gb
Q3OGEPn.gif
Thử debug trong about:performance xem nguyên nhân là do thằng nào, cơ mà nơi để debug chuẩn nhất là about:memory, nó hiện chi tiết thằng nào tham nhũng RAM.

Cách sử dụng about:memory thì như sau, Measure sau đó thấy cái sidebar bên cạnh thì ấn vào từng cái một sẽ ra thông số RAM, những cái thuộc về extension, webisolated, Main Process thì chữa tay được, còn GPU với mấy cái khác thì bó tay:

1693889512886.png
 
Thử debug trong about:performance xem nguyên nhân là do thằng nào, cơ mà nơi để debug chuẩn nhất là about:memory, nó hiện chi tiết thằng nào tham nhũng RAM.
Thì Miêu sài thằng about:memory xong bấm nút Minimize memory usage thì nó giảm đc 500-1Gb memory. Chắc nó dọn allocated memory. Còn lúc nãy khi Floorp đang ăn 4Gb ram bấm cái nó giật còn 1.8Gb->2Gb nên mới hỏi fen đó
6HDMWk2.gif
 
Thì Miêu sài thằng about:memory xong bấm nút Minimize memory usage thì nó giảm đc 500-1Gb memory. Chắc nó dọn allocated memory. Còn lúc nãy khi Floorp đang ăn 4Gb ram bấm cái nó giật còn 1.8Gb->2Gb nên mới hỏi fen đó
6HDMWk2.gif
Thường thì trình duyệt web ngày nay nó sẽ cố tình chiếm RAM hệ điều hành nếu như máy có nhiều RAM, nói chung cứ Measure trong about:memory mới hiểu rõ chính xác nó ở đâu đó.
 
Hướng dẫn thủ thuật lấy bảng biển dữ liệu trên Firefox, ví dụ thế này đi cho trực quan: https://www.w3schools.com/html/html_tables.asp

Kéo xuống tí để thực hành nhé, cái này rất hữu ích cho việc lấy dữ liệu mà bình thường ra trình duyệt khác nếu không nhầm phải dùng Javascript rất cực (ít nhất mình test thử với Ungoogled Chromium không được), Firefox nó có mẹo này nhanh:

1693966151094.png


Ví dụ mình là một người ăn cắp dữ liệu để luyện AI đi, mình sẽ lấy Contact (Tên) người dùng, mình:
  • Giữ chặt nút Ctrl
  • Từ Maria chuột trái kéo xuống Giovanni
  • Sau đó Ctrl+C mà copy thôi

Kết quả:
1693966250734.png


Khi copy ra Notepad:

Code:
Maria Anders
Francisco Chang
Roland Mendel
Helen Bennett
Yoshi Tannamuri
Giovanni Rovelli

Khi copy vào trình duyệt:
Maria Anders
Francisco Chang
Roland Mendel
Helen Bennett
Yoshi Tannamuri
Giovanni Rovelli

Hoặc cũng có thể lấy dữ liệu bằng cách giữ Ctrl rồi click từng ô một:
1693966397626.png


Kết quả:
Code:
Alfreds Futterkiste
Francisco Chang
Austria
Alfreds Futterkiste
Francisco Chang
Austria
 
Hướng dẫn cách fake IP mà không fake IP để vượt DPI những trang cần vượt sử dụng ProxySwitchy Omega ở #1 tại một số bạn không dùng ECH được.

Ưu điểm:
  • Hoạt động trên 100% trang web thậm chí không cần ECH, không quan tâm là Medium, Bonhup hay ẾchVid...
  • Giải pháp mang tính toàn tổng hơn sử dụng cách thức băm nhỏ gói tin ClientHello ra để vượt cạn
  • KHÔNG HỀ fake IP, nghĩa là tốc độ sẽ nguyên 100%, không tốn 1 xu, không dựa dẫm vào một ai cả
  • Không gây lỗi web như GoodbyeDPI vì nó chỉ hoạt động trên những trang cần thiết chứ không toàn bộ hệ thống

Cách thức:
  • Tải HTTP Chunk Rust Proxy tại đây: https://github.com/vinhjaxt/rust-DPI-http-proxy/releases
  • (Nếu Chunk Rust không hoạt động có thể thử Demergi, thiết lập y hệt không cần chỉnh chọt gì)
  • Bật lên
  • (Mẹo) Ấn Win+R rồi gõ shell:startup sau đó ném Shortcut của HTTP Chunk Rust Proxy vào để nó chạy cùng hệ thống
  • Vào phần thiết lập của ProxySwitchy Omega tạo một Proxy Profile tên ChunkRust, điền vào là 127.0.0.1 port 8080 rồi Apply
  • Tạo tiếp một Switch Profile tên GoodbyeDPI rồi Add condition rồi chọn Type là Host regex, Details là ^.*?(?:medium.com|pornhub.com|xvideos.com) chọn Profile là ChunkRust rồi Apply
  • (Chú ý) Muốn thêm trang nào thì tự thêm vào phần Details
  • Chọn proxy là GoodbyeDPI trên thanh toolbar của ProxySwitchy Omega, và thế là xong.
View attachment 1831626
View attachment 1831625

View attachment 1831624

Vào Medium, Bonhup hay ẾchVid... test là thấy sẽ qua tuốt.

Đây là video mình test, ngon nuột nà với VNPT (chú ý video đã bị che gần như 100%): https://streamable.com/efyjim

View attachment 1831628
cho em hỏi phần add condition để chọn type host regex của profiles goodbyedpi là ở đâu v mọi người. em tìm ko thấy
1693983619726.png
 
Back
Top