-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add new post about IPv6 connection problems
- Loading branch information
1 parent
123cb39
commit 6c10b7e
Showing
4 changed files
with
108 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,3 +15,5 @@ group :jekyll_plugins do | |
gem "jekyll-include-cache" | ||
gem "jekyll-algolia" | ||
end | ||
|
||
gem "webrick", "~> 1.8" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
--- | ||
title: "IPv6 connectivity problems on Linux" | ||
categories: | ||
- Troubleshooting | ||
tags: | ||
- Linux | ||
- IPv6 | ||
- HTTP | ||
--- | ||
|
||
The problem with IPv6 connection got me each time with Git hostings and | ||
recently with ruby gem registry. I don't know the root of this problem, just | ||
turned off IPv6 and everything is fine. | ||
|
||
There a several ways to do it, though. One helps me with GitLab SSH access and | ||
second with ruby gem registry. | ||
|
||
## Configure SSH to work with IPv4 instead of IPv6 | ||
|
||
Run `sudo $EDITOR /etc/ssh/ssh_config`, find the field `AddressFamily` and set | ||
it to `inet`. You are done :) | ||
|
||
## Configue NetworkManager to use Link-Local Only Method for IPv6 with corresponding network | ||
|
||
Open `Edit Connections...` menu in nm-applet, choose the network you're using | ||
right now, double-click on it, open `IPv6 Settings` tab and set `Method` to | ||
`Link-Local Only`. This settings solved my problems with other registers like | ||
ruby gems and bun.js. | ||
|
||
Good luck! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
// Clipboard | ||
// This makes the button blink 250 miliseconds | ||
|
||
function sleep(ms) { | ||
return new Promise(resolve => setTimeout(resolve, ms)); | ||
} | ||
|
||
async function buttonBlink(btn, style) { | ||
btn.classList.remove("btn-light"); | ||
btn.classList.add(style); | ||
await sleep(250); //Blink ms | ||
btn.classList.remove(style); | ||
btn.classList.add("btn-light"); | ||
} | ||
// End | ||
|
||
|
||
// Select highlghted codes | ||
var codeChunk = document.querySelectorAll("pre.highlight"); | ||
|
||
// Loop to add buttons | ||
for (var i = 0; i < codeChunk.length; i++) { | ||
|
||
var pre = codeChunk.item(i); | ||
var btn = document.createElement("button"); | ||
// Prepare button | ||
btn.innerHTML = "<i class='far fa-copy'></i>"; // Icon to be displayed on the button | ||
|
||
// Inline styling - may be a new css class, to be added in the next section | ||
btn.style.position = "absolute"; | ||
btn.style.right = "1em"; | ||
|
||
// Button: CSS - Add new classes | ||
btn.classList.add("btn", "btn--primary"); | ||
|
||
// Identifier for ClipboardJS | ||
btn.setAttribute("data-clipboard-copy", ""); | ||
|
||
// aria-label: btn.setAttribute("aria-label", "Copy to clipboard"); | ||
// etc. | ||
|
||
// Insert button | ||
pre.insertBefore(btn, pre.firstChild); | ||
|
||
} | ||
// End | ||
|
||
// Copy to clipboard | ||
var clipboard = new ClipboardJS("[data-clipboard-copy]", { | ||
target: function (trigger) { | ||
return trigger.nextElementSibling; | ||
} | ||
}); | ||
|
||
// Messages and make the button blink | ||
clipboard.on("success", function (e) { | ||
e.clearSelection(); | ||
buttonBlink(e.trigger, "btn--success"); | ||
console.info("Action:", e.action); | ||
console.info("Text:", e.text); | ||
console.info("Trigger:", e.trigger); | ||
}); | ||
|
||
clipboard.on("error", function (e) { | ||
e.clearSelection(); | ||
buttonBlink(e.trigger, "btn--danger"); | ||
console.info("Action:", e.action); | ||
console.info("Trigger:", e.trigger); | ||
}); | ||
// Finish |