Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
freedombone
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Context Sensitive Group
freedombone
Commits
54aa0b55
Unverified
Commit
54aa0b55
authored
8 years ago
by
Bob Mottram
Browse files
Options
Downloads
Patches
Plain Diff
Global rate limit for client
parent
f984d029
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/freedombone-client
+13
-0
13 additions, 0 deletions
src/freedombone-client
with
13 additions
and
0 deletions
src/freedombone-client
+
13
−
0
View file @
54aa0b55
...
...
@@ -57,6 +57,18 @@ SSH_HOST_KEY_ALGORITHMS=$(cat $MAIN_PROJECT_FILE | grep 'SSH_HOST_KEY_ALGORITHMS
# refresh gpg keys every few hours
REFRESH_GPG_KEYS_HOURS
=
2
function
global_rate_limit
{
sudo cp
/etc/sysctl.conf ~/sysctl.conf
if
!
grep
-q
"tcp_challenge_ack_limit"
~/sysctl.conf
;
then
echo
'net.ipv4.tcp_challenge_ack_limit = 999999999'
>>
~/sysctl.conf
else
sed
-i
's|net.ipv4.tcp_challenge_ack_limit.*|net.ipv4.tcp_challenge_ack_limit = 999999999|g'
~/sysctl.conf
fi
sudo cp
~/sysctl.conf /etc/sysctl.conf
sudo rm
~/sysctl.conf
sudo
sysctl
-p
}
function
refresh_gpg_keys
{
if
[
!
-f
/usr/bin/gpg
]
;
then
sudo
apt-get
-y
install
gnupg
...
...
@@ -188,6 +200,7 @@ done
echo
$'Configuring client'
refresh_gpg_keys
configure_ssh_client
global_rate_limit
configure_monkeysphere
if
[[
$MESH_CLIENT_INSTALL
==
$'yes'
||
$MESH_CLIENT_INSTALL
==
$'y'
||
$MESH_CLIENT_INSTALL
==
$'on'
]]
;
then
echo
$'Installing mesh packages'
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment