Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Valentin Benozillo
slapos
Commits
29f8ecbe
Commit
29f8ecbe
authored
Jun 28, 2018
by
Lorenzo Martinico
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Patch user agent with Windows Chrome
parent
6f719dbb
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
2 deletions
+21
-2
software/nayuos/instance.cfg
software/nayuos/instance.cfg
+2
-1
software/nayuos/patches/user-agent.patch
software/nayuos/patches/user-agent.patch
+14
-0
software/nayuos/scripts/cros_full_build.in
software/nayuos/scripts/cros_full_build.in
+4
-0
software/nayuos/software.cfg
software/nayuos/software.cfg
+1
-1
No files found.
software/nayuos/instance.cfg
View file @
29f8ecbe
...
...
@@ -99,7 +99,7 @@ context =
recipe = slapos.recipe.template:jinja2
template = {{ software_dir }}/scripts/cros_full_build.in
rendered = ${directory:run}/cros_full_build
md5sum =
e11a8ed3fc100ddf591469ca8ac75d52
md5sum =
2191410a2e84d71164b9b13abdc95ef5
mode = 0700
context =
key bash_path bin:bash
...
...
@@ -111,6 +111,7 @@ context =
key keep_cache parameters:configuration.keep_cache
key ebuilds_dir nayuos-ebuilds:location
raw scripts_dir {{ software_dir }}/scripts
raw patches_dir {{ software_dir }}/patches
raw logo_dir {{ software_dir }}/logo
# packages to be copied from our overlay into ChromiuOS' overlay
# those packages will be marked as dependency of root filesystem
...
...
software/nayuos/patches/user-agent.patch
0 → 100644
View file @
29f8ecbe
diff --git a/login_manager/chrome_setup.cc b/login_manager/chrome_setup.cc
index cbe93f471..bd72cbb09 100644
--- a/login_manager/chrome_setup.cc
+++ b/login_manager/chrome_setup.cc
@@ -341,6 +341,9 @@
void AddSystemFlags(ChromiumCommandBuilder* builder) {
// On developer systems, set a flag to let the browser know.
if (builder->is_developer_end_user())
builder->AddArg("--system-developer-mode");
+ //Modify user agent to improve anonimity by preventing fingerprinting
+ const char* useragent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.181 Safari/537.36"
+ builder->AddArg(base::StringPrintf("--user-agent=%s",useragent))
}
// Adds UI-related flags to the command line.
software/nayuos/scripts/cros_full_build.in
View file @
29f8ecbe
...
...
@@ -152,6 +152,10 @@ increase_revision_number ${CHROMIUM_OVERLAY}/chromeos-base/openssh-server-init/
sed -i -n '/src_install/q;p' $(latest_ebuild ${CHROMIUM_OVERLAY}/chromeos-base/chromeos-sshd-init)
increase_revision_number ${CHROMIUM_OVERLAY}/chromeos-base/chromeos-sshd-init/
# modify user agent to improve anonimity by preventing fingerprinting
NEWUSERAGENT="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.181 Safari/537.36"
sed -i "s!\$USERAGENTSTRING!${NEWUSERAGENT}!" {{patches}}/user-agent.patch
patch {{ cros_location }}/{{ branch }}/src/platform2/login_manager/chrome_setup.cc {{patches}}/user-agent.patch
# bashrc modifications
BASH_EBUILD_DIR="${PORTAGE_STABLE}/app-shells/bash"
...
...
software/nayuos/software.cfg
View file @
29f8ecbe
...
...
@@ -26,7 +26,7 @@ recipe = slapos.recipe.template:jinja2
template = ${:_profile_base_location_}/instance.cfg
rendered = ${buildout:directory}/instance.cfg
mode = 0644
md5sum =
037a1c8c1091f07e8e5660b59223743f
md5sum =
688e5495d5a21a19f228e1820b3aeaa8
context =
key software_dir :_profile_base_location_
key instance_dir buildout:directory
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment