Skip to content

Firefox

모질라 파이어폭스(Mozilla Firefox)는 모질라 재단과 모질라 코퍼레이션이 개발하는 자유 소프트웨어 웹 브라우저로 윈도우, 리눅스, OS X 그리고 안드로이드에서 실행할 수 있다. 이 브라우저는 2014년 2월 기준, 전 세계 웹 브라우저 시장 점유율 약 12%~22%를 차지하고 있으며 지역에 따라 두 번째나 세 번째로 가장 많이 쓰이는 웹 브라우저이다. 모질라에 따르면 전 세계 4억 5천만명 이상의 사용자가 있다고 한다. 특히, 인도네시아, 이란, 독일, 폴란드에서는 가장 인기 있는 웹 브라우저로 각각 55%, 46%, 43%, 41%의 시장 점유율을 기록하고 있다.

웹 페이지를 표시하기 위해 게코 레이아웃 엔진을 사용하며 웹 표준을 구현하고 있다. 탭 브라우징, 맞춤법 검사, 통합 검색, 라이브 북마크, 다운로드 관리자 등이 있다. 그리고 사용자가 원하는 검색엔진(대부분 지역에선 구글이 기본)을 사용할 수 있는 통합 검색 시스템이 있다.(안드로이드 기준. 검색바를 길게 누르면 검색 엔진을 직접 추가 할 수 있다.)

제3자가 만든 부가 기능으로 기능을 추가할 수도 있다.

Categories

Plugins

광고 차단

JavaScript 관련

Installation

Ubuntu

echo "deb http://deb.debian.org/debian/ unstable main contrib non-free" >> /etc/apt/sources.list.d/debian.list
apt-get update
apt-get install -y --no-install-recommends firefox

Extended Support Release

Command Line Options

Shortcuts

Firefox의 키보드 단축키 목록:

  • Ctrl+L: for the Location bar.
  • Ctrl+K: for the Search bar.

Do Not Track

대부분의 웹 사이트들은 방문자의 웹 사용 정보를 트랙킹하여 다른 업체에 판매하거나 제공하고 있습니다. 이 정보는 여러분을 특별히 목표로 하여 광고, 상품, 서비스를 나타내는 것에 사용됩니다. Firefox의 "Do Not Track (추적 중지 기능)"은 웹 사이트에 트랙킹을 중지하도록 요청합니다.

추적 중지 기능을 사용하면, Firefox는 여러분이 방문하는 모든 웹 사이트(광고주나 다른 컨텐츠 제공자 포함)에 대해 여러분을 트랙킹하지 않도록 요청합니다. 이 설정을 존중하는 것은 회사의 결정입니다 — 개인 웹 사이트가 이 설정을 존중하는 것은 요구되지 않습니다. 이 설정을 존중하는 웹 사이트들은 자동으로 여러분의 웹 사용 정보를 트랙킹하는 것을 중지할 것입니다. 추적 중지 기능을 사용하여도, 웹 사이트에 로그인하는 기능에 영향을 주지 않고, 개인 정보를 잃어버리게 하지 않습니다 — 장바구니, 위치 정보, 로그인 정보와 같은.

설정 > 개인정보 > 웹 사이트에 방문자 추적 중지 요청

또는 about:preferences를 URL에 입력해도 된다.

User-Agent 변경

about:configgeneral.useragent.override 속성에서 String 을 선택한 후 "+" 버튼을 클릭하고 원하는 User-Agent 를 입력하자.

확장(플러그인) 설치 방법

참고로 -install-global-extension 플래그는 더 이상 사용되지 않는다 [^0]

For latest versions of Firefox, the procedure has been simplified a lot!

  1. Unzip extension.xpi
  2. Read applications.gecko.id from manifest.json
  3. Rename extension.xpi to {ID}.xpi (파일 이름에 중괄호({, })가 포함된다)
  4. Copy to one of the standard installation folders listed here
unzip -p extension.xpi manifest.json | jq .applications.gecko.id | sed 's/"//g' | xargs -I {} cp -v extension.xpi "<profile_directory>/extensions/{}.xpi"

메모리 과다 사용 문제 해결 방법

불필요한 콘텐츠를 차단시키는 확장기능도 있습니다. 예를 들면,

  • Adblock PlusuBlock Origin은 웹 사이트의 광고를 숨겨줍니다.
  • NoScript는 웹 사이트에서 실행되는 스크립트를 선택적으로 사용하거나 사용 중단할 수 있습니다.

프로세스 셀프 관리를 위한 #Task Manager (about:processes) 페이지도 있다.

Task Manager

about:processes URL 로 접속할 수 있다.

Firefox config

about:config페이지에서 Firefox의 상세 설정을 조정할 수 있다.

  • javascript.enabled: 자바스크립트 기능을 ON/OFF할 수 있다.
  • dom.event.contextmenu.enabled: 마우스 우클릭 이벤트를 방지한다. 즉, 이 기능을 false할 경우 마우스 우클릭이 방지되어있는 웹페이지에서 우클릭을 할 수 있다.
  • network.manage-offline-status: 브라우저의 OFFLINE 상태와 ONLINE 상태를 관리하는 모드를 ON/OFF 할 수 있다. 이 모드를 false로 전환하면 네트워크 인터페이스가 OFF 상태로 전환되었을 때, window.navigator.onLine 값을 조회해도 true가 출력된다.
  • network.online: 브라우저가 시작되었을 때 온라인 상태로 고정할 것인지 여부.

Font settings

Fission

파이어폭스에 Fission(핵분열)이라는 이름으로 사이트 격리가 들어갈 예정, Spectre와 같은 공격에서 상대적으로 안전해짐. 별도의 프로세스를 사용하여 안정성이 증가하고, 한페이지에서 많은 작업이 있더라도 응답성이 향상됨.

WebRTC Privacy

WebRTC의 개인 정보 보호와 관련된 설정.

media.peerconnection.ice.obfuscate_host_addresses
호스트 주소 난독화 (?)

Prefs that control ICE Candidate generation

All of these can be set from about:config, or controlled via an extension

media.peerconnection.ice.force_interface - string (default "")
interface name to match for ICE (Firefox 43, uplifted to 42, requested for 41)
  • If set, and there is no interface that matches exactly, NO candidates will be generated
  • If set and there is a match, that interface will be used solely for ICE. Local (LAN) and external IP addresses for that interface will be used for ICE candidates. This can be pointed at a single external interface to hide/ignore internal (VM) interfaces, unconnected interfaces or VPNs (e.g. work VPNs). It can also be set to a VPN interface, and then ICE will only use the VPN (and if the VPN is down, ICE will fail).
media.peerconnection.ice.relay_only - boolean (default false)
only generate relay (TURN) candidates for ICE (Firefox 42)
  • This can be used to block all local (LAN) and external IP addresses from being generated as candidates.
  • An example use-case would be avoiding exposing your external IP address to a caller (such as when avoiding disclosing you're in town Xxxxx when having a call with someone you have a protection order against; roughly the equivalent of blocking outgoing caller-id on the PSTN bug *-whatever)
  • NOTE: does not hide your external IP address from the TURN server itself (see use_document_iceservers and default_iceservers to restrict to a TURN of your choice).
media.peerconnection.use_document_iceservers - boolean (default true)
use STUN/TURN servers provided by the page (all recent Firefox versions)
  • If set to false and media.peerconnection.default_iceservers is set to the server(s) you want to use, only those servers will be used, and no server provided by the page will be used.
  • This can be useful for corporate 'gateway' TURN servers, or for a TURN server hosted by a VPN provider.
media.peerconnection.ice.default_address_only - boolean (default false)
limit ICE candidates to the default interface only (Firefox 43, uplifted to 42)
  • The default interface used for general routing is identified and only that address is used for candidate generation
  • LAN IP addresses are not generated, the external IP address for that interface is (for a VPN, the exit portal of the VPN)
  • If your router does not support 'hairpinning', a within-LAN call will end up being routed through an external TURN server
media.peerconnection.ice.no_host - boolean (default false)
eliminate all local addresses from the candidates (Firefox 51)
media.peerconnection.enabled - boolean (default true)
enables/disabled ability to create RTCPeerConnection objects (all recent Firefox versions)

Trusted Recursive Resolver

Firefox provides an optional resolver mechanism using a dedicated DNS-over-HTTPS server.

DNS-over-HTTPS (DOH) allows DNS resolves with enhanced privacy, secure transfers and improved performance.

Setting DNS-over-HTTPS in Firefox

network.trr.uri
DNS over HTTPS를 지원하는 호스트 서버를 입력합니다. 공개된 서버 주소는 아래와 같다.
network.trr.bootstrapAddress
위에 설정한 network.trr.uri의 IP주소를의 가져올 DNS 서버를 설정합니다. 입력을 안하고 빈칸으로 둬도 대부분 동작에 지장이 없다고 합니다. 만약 정상적으로 설정이 되지 않으면 동작가능한 아무 DNS 주소를 입력 하면 됩니다. 구글DNS를 사용하면 8.8.8.8 클라우드플레어 DNS를 사용하면 1.1.1.1이런식으로 입력을 하면 됩니다.
network.trr.mode
동작 방법을 설정합니다. 3 또는 2를 사용 하면됩니다.
  • 0: DNS over HTTPS 사용안함
  • 1: 기존방식과 DNS over HTTPS를 동시에 실행해서 응답이 빨리 오는걸 사용
  • 2: DNS over HTTPS를 먼저 해보고 실패 하면 기존 방식 사용
  • 3: DNS over HTTPS만 사용
  • 4: 둘이 동시에 실행하지만 기존 방식만 사용
network.security.esni.enabled
Encrypted SNI를 적용한다.

추천 설정

추천하는 설정값은 아래와 같다.

network.trr.uri: https://cloudflare-dns.com/dns-query
network.trr.bootstrapAddress: 1.1.1.1
network.trr.mode: 2
network.security.esni.enabled: true

Disable Image Loading

permissions.default.image: 2

그 밖의 설정

network.proxy.type
http://kb.mozillazine.org/Network.proxy.type
network.dns.disablePrefetch
http://kb.mozillazine.org/Network.dns.disablePrefetch

Docker container for Firefox

The GUI of the application is accessed through a modern web browser (no installation or configuration needed on the client side) or via any VNC client.

VNC 서버가 열리고, Web Browser를 통해 접속한다. 아래의 스크립트로 실행하면 된다.

#!/usr/bin/env bash

HOMEPAGE=${1:-https://google.com}
HOST_PORT=${2:-5800}
DOWNLOAD_DIR=$HOME/Downloads

echo "Run Firefox Web"
echo "Homepage: $HOMEPAGE"
echo "Download directory: $DOWNLOAD_DIR"
echo "Access URL: http://localhost:$HOST_PORT"

if [[ ! -d "$CONFIG_DIR" ]]; then
    mkdir -p "$CONFIG_DIR"
fi

docker run --rm -it \
    --security-opt seccomp=unconfined \
    --shm-size 2g \
    -p $HOST_PORT:5800 \
    -v "$DOWNLOAD_DIR:/config/downloads:rw" \
    -e "FF_PREF_HOMEPAGE=browser.startup.homepage=\"$HOMEPAGE\"" \
    -e "FF_PREF_TRR_URI=network.trr.uri=\"https://cloudflare-dns.com/dns-query\"" \
    -e "FF_PREF_TRR_BOOTSTRAP=network.trr.bootstrapAddress=\"1.1.1.1\"" \
    -e "FF_PREF_TRR_MODE=network.trr.mode=2" \
    -e "FF_PREF_ESNI=network.security.esni.enabled=true" \
    -e ENABLE_CJK_FONT=1 \
    -e TZ=Asia/Seoul \
    jlesage/firefox

linuxserver/firefox

docker run \
  --name=firefox \
  --security-opt seccomp=unconfined `#optional` \
  -e PUID=1000 \
  -e PGID=1000 \
  -e TZ=Etc/UTC \
  -e FIREFOX_CLI=https://.../ `#optional` \
  -e DOCKER_MODS=linuxserver/mods:universal-package-install \
  -e INSTALL_PACKAGES=fonts-noto-cjk \
  -e LC_ALL=ko_KR.UTF-8 \
  -p 3000:3000 \
  -p 3001:3001 \
  -v ./config:/config \
  --shm-size="1gb" \
  --rm \
  -it \
  lscr.io/linuxserver/firefox:latest

Troubleshooting

Running Firefox as root in a regular user's session is not supported

Running Firefox as root in a regular user's session is not supported. ($XDG_RUNTIME_DIR is /tmp/run/user/app which is owned by app.)
chown root $XDG_RUNTIME_DIR

폰트가 정상적으로 출력되지 않는 경우

가끔 정상적으로 폰트가 출력되지 않는 경우가 있다. Firefox는 여러 상황에서 여러 종류의 폰트를 출력한다. 다음 메뉴를 확인하면 된다.

Preference > General > Font and Colors > Advanced

다음과 같은 목록이 출력된다:

각 항목에 맞는 CJK 폰트를 설치하는걸 추천한다. 추천하는건 Adobe Source Han fonts 폰트이다.

PR_CONNECT_RESET_ERROR

잘 모를 수 있는 방법 몇 가지:

DNS 프리페치 비활성화:
DNS 프리페칭 기능은 Firefox에서 브라우징 속도를 높일 수 있습니다. 때때로 충돌이 발생하면 이 기능이 사이트의 정상적인 로드를 방해하고 Firefox 연결 재설정 문제로 이어질 수 있습니다. 아래 지침에 따라 DNS 프리페칭 기능을 비활성화해 보십시오.
about:config -> network.dns.disablePrefetch을 True로 변경.
IPv6 비활성화
IPV6 프로토콜은 여러 브라우저에서 기본적으로 사용됩니다. 그러나 때때로 이 브라우저가 브라우저를 방해하여 이러한 문제를 일으킬 수 있습니다. 오류를 해결하려면 아래 지침에 따라 IPV6을 비활성화하십시오.
about:config -> network.dns.disableIPv6을 True로 변경.
추적 안 함 옵션 수정
이 옵션은 방문 중인 웹사이트의 쿠키를 추적하지 않도록 브라우저 헤더에 신호를 보냅니다. 이 기능은 PR_CONNECT_RESET_ERROR Firefox 문제를 일으킬 수도 있습니다.
Settings > Privacy & Security > "Do Not Track"

Couldn't load XPCOM

다음과 같은 에러가 출력될 수 있다:

XPCOMGlueLoad error for file /opt/firefox/libxul.so:
libasound.so.2: cannot open shared object file: No such file or directory
Couldn't load XPCOM.

또는:

XPCOMGlueLoad error for file /opt/firefox/libxul.so:
libXtst.so.6: cannot open shared object file: No such file or directory
Couldn't load XPCOM.

해당 라이브러리를 설치하자:

sudo apt-get install libasound2 libxtst6

See also

Favorite site

Build

Plugin