Skip to content

Commit

Permalink
fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
AnonymusNW committed Mar 19, 2024
1 parent bfbf6fd commit 015cbd8
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
16 changes: 16 additions & 0 deletions RyuSocks/Packets/Auth/Constants.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
/*
* Copyright (C) RyuSOCKS
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2,
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

namespace RyuSocks.Packets.Auth
{
public static class Constants
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ namespace RyuSocks.Packets.Auth.UsernameAndPassword
{
public class UsernameAndPasswordRequest : Packet
{

public byte Version
{
get
Expand Down Expand Up @@ -56,6 +55,8 @@ public string Username
}
set
{
ArgumentOutOfRangeException.ThrowIfGreaterThan(value.Length, 0xFF);
UsernameLength = (byte)value.Length;
Encoding.ASCII.GetBytes(value).CopyTo(Bytes.AsSpan(2, UsernameLength));
}
}
Expand Down

0 comments on commit 015cbd8

Please sign in to comment.