← IGCSE Computer Science Paper 1

How a proxy server keeps data safe

A server between a user and the internet that filters requests, blocks unsafe sites, hides the user's IP address, checks responses for malware and caches pages for speed.

Understanding How a proxy server keeps data safe in IGCSE Computer Science Paper 1

What it does: The website sees the proxy's IP address instead of the user's, so the user's real address stays hidden. The proxy compares the requested site with its blocklist and refuses the request if it is unsafe. All requests and responses pass through the proxy, which gives it the chance to check them. Proxies can scan responses as well as requests, so harmful content can be stopped before it reaches the device. A cache stores pages already requested so the proxy can serve them quickly without fetching them again. A proxy can filter and block sites, but it cannot make unsafe sites trustworthy.

Common mistakes: A proxy server must block a request for a site on the blocklist. Line 3 forwards it, so the unsafe site is reached. It should be BLOCK request. The proxy swaps in its own IP address, then must send the request on to the website. Sending it to proxy.ip sends it back to itself. It should be SEND request TO website.

Class: _____________________  ·  Name: _____________________  ·  Date: _________

Free printable worksheet with full answer key — or add this module to a class and your students practise it interactively.

This module's key terms are also in a printable crossword (Modules 553–577) and word search (Modules 553–607).

Take this worksheet further — free with Cloodit

Each concept is reinforced from every angle — learned, then applied, then tested.

Learning
Duo
A school proxy server blocks a website known to host malware. What does this protect users from?
Visiting an unsafe site and downloading harmful filesHaving their passwords guessed by a brute-force attack
Matches
proxy.forward(user.ip, request) # shows real IP
↓
The proxy passes on the user's real IP address, so it does not hide the user. It should send its own IP address.
Applying
Meanings
Term
proxy server
Meaning
A server between a user and the internet that filters requests, blocks unsafe sites, hides the user's IP address, checks responses for malware and caches pages for speed.
Practice
site <- INPUT
Testing
Gaps
IF site IN blocklist THEN (site)
Check Answer
Spots
2IF url IN blocklist THEN
3 FORWARD request

Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.

The 'Space Turtle' badge — Speed in Zero-G, one of Cloodit's 106 collectible badges
Students earn collectable badges

Over 100 of them, across seven natural biomes.

Study Buddy
Students build a real study resource

Turns their work into revision material ready for Flash Cards and Exam study.

Diamond Dash — one of Cloodit's live, competitive Sprint games
Students lock in with Sprints

Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.

A Cloodit certificate of achievement, ready to personalise and print
Custom printable certificates

Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.

Quick Questions

1. A school proxy server blocks a website known to host malware. What does this protect users from?
A. Visiting an unsafe site and downloading harmful files ✓
B. Having their passwords guessed by a brute-force attack
A proxy compares each request against a list of blocked sites and stops unsafe ones before the page loads.
2. Which statement about a proxy server and the user's IP address is correct?
A. The website sees the proxy's IP address, not the user's ✓
B. The website always sees the user's real IP address
The proxy sends the request on behalf of the user, so the user's own IP address stays hidden from the website.
3. Where does a proxy server sit?
A. Inside the website's database
B. Between the user's device and the internet ✓
All requests and responses pass through the proxy, which gives it the chance to check them.
4. A proxy server checks a response from a website and finds malware in it. What does it do?
A. Passes it on, because responses are never checked
B. Blocks the response so it never reaches the user ✓
Proxies can scan responses as well as requests, so harmful content can be stopped before it reaches the device.
5. A proxy server keeps a copy of a popular web page. What is this called and why is it useful?
A. Caching, because the page loads faster next time ✓
B. Encrypting, because the page is turned into ciphertext
A cache stores pages already requested so the proxy can serve them quickly without fetching them again.

Match the Pairs

proxy server → A server between the user and the internet that filters requests and responses to keep the user safe
proxy.cache(page) → Stores a copy of a web page so it loads faster next time it is requested
A proxy server hides the user's IP address by sending the request using its own address → request.source_ip = proxy.ip
A proxy server blocks unsafe websites by checking each request against a list of banned sites → if site in blocklist: deny(request)
proxy.forward(user.ip, request) # shows real IP → The proxy passes on the user's real IP address, so it does not hide the user. It should send its own IP address.
if response has malware: allow(response) → The proxy allows a response containing malware. It should block or discard that response before it reaches the user.

Key Term

proxy server
A server between a user and the internet that filters requests, blocks unsafe sites, hides the user's IP address, checks responses for malware and caches pages for speed.

Fill in the Blanks

1. IF site IN blocklist THEN BLOCK(site)
Hint: Type the action the proxy takes when a requested site is on the unsafe list.
2. // Hide the user's IP address request.ip ← proxyIP
Hint: Type the variable holding the proxy's own address, written as two words joined together, which replaces the user's address.
3. result ← SCAN(response) IF result = "infected" THEN DISCARD
Hint: Type the function name that checks a response for malware.
4. IF page IN cache THEN RETURN cache[page] ENDIF
Hint: Type the operator that checks whether the page is already stored in the cache.
5. IF site IN safelist THEN FORWARD(request) ENDIF
Hint: Type the action that passes an allowed request on to the web server.

Spot the Error

Question 1
A INPUT url
B IF url IN blocklist THEN
C FORWARD request
D ELSE
E FORWARD request
F ENDIF
Line C — A proxy server must block a request for a site on the blocklist. Line 3 forwards it, so the unsafe site is reached. It should be BLOCK request.
Question 2
A RECEIVE request FROM user
B request.ip ← proxy.ip
C SEND request TO proxy.ip
Line C — The proxy swaps in its own IP address, then must send the request on to the website. Sending it to proxy.ip sends it back to itself. It should be SEND request TO website.
Question 3
A RECEIVE url FROM user
B IF url IN cache THEN
C BLOCK url
D ELSE
E FETCH url
F ENDIF
Line B — To block unsafe sites the proxy must check the URL against the blocklist, not the cache. Line 2 should be IF url IN blocklist THEN.
Question 4
A IF url NOT IN cache THEN
B page ← cache[url]
C ELSE
D page ← FETCH(url)
E cache[url] ← page
F ENDIF
Line A — The proxy should use the cached copy only when the page IS already in the cache. NOT makes the logic backwards. It should be IF url IN cache THEN.
Question 5
A RECEIVE request FROM user
B safe ← CHECK(request)
C IF safe = TRUE THEN
D BLOCK request
E ENDIF
Line D — When the request passes the check (safe = TRUE) the proxy should forward it to the website. Blocking it stops safe requests. It should be FORWARD request.

Student with a class code? Join your class →