In the following sudoku, the numbers on the outside indicate the first number less than 6 seen in that row/column. In addition, a number in the sudoku cannot be a knight's move from an identical number. This is a link to the sudoku in Google Sheets. Good luck!
Nice one, although probably a bit too difficult to start so near my (now completely missed) bedtime! Here's the finished grid:
For a complete write-up see below. (Warning: may get a bit complicated.)
First, we'll grab the low hanging fruit. Since numbers 6-9 are interchangeable wrt. the visibility rule, let's just colour those squares green:
Then, we can count the number of green squares along the border rows and columns; each should of course have exactly 4 greens. If a digit clue is repeated along an edge, we know (by sudoku) that at most one of the corresponding edge squares can be non-green. Along every border, we find all the green squares, so we get to fill the remaining squares with digits.
The 4 in box 9 is now forced, so we get the 5 there too. Also, the 2 in column one blocks visibility, so we get the three there.
The threes on rows 7 and 8 are very restricted; we can actually already place them: the other placement would require way too many greens in box 8. This gives us a couple of ones too.
This is the first difficult bit: the middle row of box 6 sees a lot of small digits. r5c8 is clearly green, but so is the neighbouring r5c7: the 5 in box 3 has only 3 possible spots, and every one of them sees r5c7. So we get all the greens on row 5, and we can do some sudoku.
The 9 in column 7 has only one possible spot, but the important question is "can the middle cell in box 8 be green?" The answer is no, that would force five green squares into column 5. So r8c5 must be a 5, which restricts the middle box so much that r4c8 must be non-5, which in box 6 means "green".
After that, the 1 in box 4 must be on row 4, which fixes row 5 and we get a lot of progress.
Finally, we get to do some sudoku. Finding the restrictions with the knight's move constraint is tedious, but there are only a couple of interesting deductions left.
Some more sudoku..
This is where I got stuck for a while. The solution I found is to show that the middle square of box 1 must be green. There are a couple of ways to do that, all complex enough that you're going to want to check it yourself anyway. (Hindsight edit: in box 1, the 1 must be on row 3, and the other non-greens are already in column 2. Ouch.) Since that square sees both possible spots for the 8 in box 4, we get that r2c2 is a six.
Finally, the 9 on row 1 cannot be in column 3, that square sees both possible spots for a 9 in box 2. After that we'll just fill the rest of the digits in, and since we are not barbarians, we'll also finish the colouring.