Skip to content

Commit

Permalink
Add new post about IPv6 connection problems
Browse files Browse the repository at this point in the history
  • Loading branch information
arkis-dmytro-zakharov committed Jun 8, 2024
1 parent 123cb39 commit 6c10b7e
Show file tree
Hide file tree
Showing 4 changed files with 108 additions and 2 deletions.
2 changes: 2 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,5 @@ group :jekyll_plugins do
gem "jekyll-include-cache"
gem "jekyll-algolia"
end

gem "webrick", "~> 1.8"
8 changes: 6 additions & 2 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ description: >- # this means to ignore newlines until "baseurl:"
Google search results) and in your feed.xml site description.
twitter_username: username
github_username: username
minimal_mistakes_skin: default
minimal_mistakes_skin: dark
search: true

# Build settings
markdown: kramdown
remote_theme: mmistakes/minimal-mistakes
remote_theme: mmistakes/minimal-mistakes@4.26.1
# Outputting
permalink: /:categories/:title/
paginate: 5 # amount of posts to show
Expand All @@ -36,6 +36,10 @@ timezone: # https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
include:
- _pages

after_footer_scripts:
- https://cdn.jsdelivr.net/npm/clipboard@2/dist/clipboard.min.js
- assets/js/clipboardrouge.js

# Exclude from processing.
# The following items will not be processed, by default. Create a custom list
# to override the default setting.
Expand Down
30 changes: 30 additions & 0 deletions _posts/2024-06-05-ipv6-connection-problems-on-linux.md
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!
70 changes: 70 additions & 0 deletions assets/js/clipboardrouge.js
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

0 comments on commit 6c10b7e

Please sign in to comment.