Making Minimalist HTTPS Client in C on Linux

Поділитися
Вставка
  • Опубліковано 10 січ 2025

КОМЕНТАРІ • 72

  • @Kabodanki
    @Kabodanki Рік тому +11

    I love how your video doesn't jump everywhere all the times

  • @littlecurrybread
    @littlecurrybread Рік тому +10

    I’m loving this c stuff. Would love to see more in this vein.

  • @utvikler-no
    @utvikler-no Рік тому +11

    This is incredible good stuff for developing small IOT devices that should listen to or read settings or logs from other devices
    Thanks!

  • @JonathanNelson-nelsonj3
    @JonathanNelson-nelsonj3 8 місяців тому

    Thank you for these videos. As a developer with a Java shaped brain these are just what I have needed to get into C coding.

  • @silakanveli
    @silakanveli Рік тому +1

    Please make video about pointers and why they are used. You have such a great way to explain concepts!

    • @nirlichtman
      @nirlichtman  Рік тому +1

      That is a good idea for a short, thanks :)

  • @dazealex
    @dazealex Рік тому

    What a cool way of making a video on this. Super easy to follow. Love it!

  • @Jonathan-ru9zl
    @Jonathan-ru9zl 8 місяців тому +1

    Great content!
    Please consider making a video about the differences between TCP and UDP

    • @nirlichtman
      @nirlichtman  8 місяців тому +2

      I will add to my list :)

  • @sirk3v
    @sirk3v Рік тому +19

    when you call man on a command, ....where is the documentation comming from, is "C" inbuilt in linux? noob question

    • @abulaman8713
      @abulaman8713 Рік тому +3

      Yes it is

    • @hoteny
      @hoteny Рік тому

      @@abulaman8713 is the definition of ”most helpful linux user”

    • @sputnick1
      @sputnick1 Рік тому +3

      its a program called man and he is looking at the postix c man pages (i think, not quite sure). You should install man and the respective man pages for whatever you need

    • @rajatmond
      @rajatmond Рік тому +1

      It depends on how you install the libraries. You can create your own manpage. I guess most installation script contains a part that also creates manpages.
      Linux OS written in c so even though you don't have a compiler by default, most system c APIs will have manpages by default.

    • @GearAddict90210
      @GearAddict90210 Рік тому

      Man was not working out of the box on arch Linux, I think installed the manpages package to get it.
      I think Ubuntu etc. Have it installed from the start.

  • @junkmeal7292
    @junkmeal7292 Рік тому +1

    Great video! It would also be nice if you made a video about DNS; so we can have a full fledged https client with domain name resolution

  • @sirk3v
    @sirk3v Рік тому

    broo, I have barely started on your first video, take it easy yoh...also any tips on how you manage your time or how to move fast like you would be highly appreciated, just like the videos...great work...truly god sent....(algorithim sent)

  • @godlyradmehr2004
    @godlyradmehr2004 Рік тому

    One of the best and practical video's that I've seen❤❤❤ nice bro

  • @tapiomakinen
    @tapiomakinen Рік тому

    Love your stuff and style. Thanks for sharing!

  • @mEm__96
    @mEm__96 Рік тому +1

    Very, very insightful content !
    I also have a question, more a curiosity. I got caught at 4:59 by the long list of autocompletion. Is it the LSP, or something else? Because, it look like the Vim built-in autocompletion functionality, just extended to search into included files. If so, I'd love to know how made it to work like that.

    • @nirlichtman
      @nirlichtman  Рік тому

      Actually, it's the built in vim autocomplete (CTRL+N), by default it also searches included files when auto completing, more information about this on ":help 'complete" :)

  • @GearAddict90210
    @GearAddict90210 Рік тому

    Very handy information to have, thanks for the video!

  • @pianissimo7121
    @pianissimo7121 Рік тому +2

    Man linux seems to much better than windows. I am really new to programming and stuff, will install linux this weekend or sometime.

    • @nirlichtman
      @nirlichtman  Рік тому

      I actually like both Windows and Linux so my setup is actually Debian Linux running on top of Windows using WSL

  • @dailydoseofshtposts6891
    @dailydoseofshtposts6891 Рік тому +1

    cant belive i was just looking for this

  • @Kar7ik28
    @Kar7ik28 Рік тому +1

    Great video man!!!! if possible can you discuss the step by step procedure to do the task instead to writing functions on the go ?

    • @Stabby666
      @Stabby666 Рік тому +1

      He's explaining the steps as he goes. You might want to start on a simpler topic if you haven't tried networking code before. This is pretty straight forward for people with some experience in networking really. The man pages he's using are also available to you, to read more if you need to.

    • @Kar7ik28
      @Kar7ik28 Рік тому

      @@Stabby666 i am assuming the tutorial is for beginners. Just discussing the points beforehand rather than going straigh to the code might be more helpful to beginners

    • @Stabby666
      @Stabby666 Рік тому

      @@Kar7ik28 I don’t understand what you mean. I think you should have the basic knowledge of how socket connections work from a networking perspective before considering writing code. Is this the part that’s causing confusion? Guess I’m not understanding where you have problems with this.

  • @niceguysayshi5765
    @niceguysayshi5765 3 місяці тому

    Is there also a production ready version of this code?

  • @andrzejcuber
    @andrzejcuber 11 місяців тому

    i wonder if you could create a movie about simple smtp client that would enable send emails from programs in C.

  • @MadMathMike
    @MadMathMike Рік тому

    You're the type of programmer I want to be when I grow up (I'm 37... 😂).

  • @ItsCOMMANDer_
    @ItsCOMMANDer_ Рік тому +3

    Can you do minimalist https server in c?

  • @nebulaworld915
    @nebulaworld915 Рік тому +1

    Great video!!! But I have a problem here, when I execute "man sockaddr" it says "No manual entry for sockaddr", What is strange is that after I install "manpages-dev glibc-doc manpages-posix manpages-posix-dev ", "No manual entry for sockaddr" is still displayed. Do you have this problem? Or what should I do?

    • @nirlichtman
      @nirlichtman  Рік тому

      Thanks! What distro are you using?

    • @nebulaworld915
      @nebulaworld915 Рік тому

      Thanks for your replay, my distro is Ubuntu and versions 18.04.6 LTS (Bionic Beaver) and 22.04.3 LTS (Jammy Jellyfish)".@@nirlichtman

    • @nirlichtman
      @nirlichtman  Рік тому

      Interesting, supposed to work, do the other manpages exist, for example socket? how about scanf?

    • @nebulaworld915
      @nebulaworld915 Рік тому

      Yes, manpages for socket and scanf exist, and executing "man ncurses" after installing "ncurses-doc" is also useful, which is weird.@@nirlichtman

    • @darkemperor9006
      @darkemperor9006 Місяць тому

      I had the same problem on Ubuntu...

  • @mister_arbuz
    @mister_arbuz Рік тому

    I tried to do this on MacOS (M1), but the OpenSSL library is missing ☹

  • @uzumakiuchiha7678
    @uzumakiuchiha7678 Рік тому

    Wow that was a lot of good new information. Thank You

  • @ikhlasulkamal5245
    @ikhlasulkamal5245 Рік тому

    Great video, very practical and informative xD

  • @mattia628
    @mattia628 Рік тому +2

    Make a video about dhcp

    • @mattia628
      @mattia628 Рік тому

      Protocols maybe a discover

  • @anon_y_mousse
    @anon_y_mousse Рік тому

    The meme version of this would be using wget or curl through the system() function.

    • @nirlichtman
      @nirlichtman  Рік тому +1

      technically still in C 😂😂 I am not sure about wget but I think curl does have a library for C called libcurl that can be used to quickly bring up a https client

  • @shivampatel4461
    @shivampatel4461 Рік тому

    hey , what man pages are you using ? , i am on arch , so it doesn't have installed by default

    • @nirlichtman
      @nirlichtman  Рік тому +1

      On Arch you can install the man-pages package which will include the man pages for system calls and c lib calls as well.
      For the SSL related man pages you can install the openssl package

    • @shivampatel4461
      @shivampatel4461 Рік тому

      thanks@@nirlichtman

  • @et2124
    @et2124 Рік тому +4

    Next up: https server in c :)

  • @jamescraft5300
    @jamescraft5300 6 місяців тому

    the document has not moved it uses http/3.0

  • @wahffle6729
    @wahffle6729 Рік тому

    Is there a reason as to why you're sending two CRLFs in your http request? Particularly because you're on linux

    • @nirlichtman
      @nirlichtman  Рік тому +1

      Yes, HTTP protocol works with CRLFs

    • @wahffle6729
      @wahffle6729 Рік тому

      Huh, interesting, only ever worked with TCP in C, the more you know. Also, great video, excited to see what you have for us up next.

  • @OlegKosmakov
    @OlegKosmakov 11 місяців тому

    Damn, I thought you'd implement SSL yourself, too :)

  • @amosnimos
    @amosnimos 3 місяці тому

    Amazing content!

  • @mytechnotalent
    @mytechnotalent Рік тому

    hell yes!!! great job!!

  • @spacewad8745
    @spacewad8745 Рік тому

    amazing stuff dude

  • @__hannibaal__
    @__hannibaal__ Рік тому +2

    Good

  • @gaeshows1938
    @gaeshows1938 Рік тому +1

    void main wtf?

  • @aah134-K
    @aah134-K Рік тому

    Super

  • @BennyPowers
    @BennyPowers Рік тому

    סחתיין מלך

  • @grijjly6091
    @grijjly6091 Рік тому

    reading 1023 byte is mistake or trick ?

    • @nirlichtman
      @nirlichtman  Рік тому

      It is on purpose; it makes sure that the buffer always ends with a null terminator (since I initialize the whole buffer with zeros, I read one less than the buffer length to always keep a zero in the end)

    • @grijjly6091
      @grijjly6091 Рік тому

      @@nirlichtman okay but why ?

    • @nirlichtman
      @nirlichtman  Рік тому

      @@grijjly6091 it is a good practice to leave a null terminator in the end in buffers you plan to treat as strings, to minimize the risk of string functions like strchr for example continuing beyond the buffer limits, I will talks about this among other tips on a future vid