OPNsense Forum

English Forums => Development and Code Review => Topic started by: kelvin1997 on April 04, 2016, 04:42:41 am

Title: Starting with the Development
Post by: kelvin1997 on April 04, 2016, 04:42:41 am
MY BACKGROUND is that I am a .net programmer, good with major js libs, all sorts of patterns, done 2t, 3t projects, can do PHP on IIS. I know little about Perl and BSD. But I believe once I get over the initial environment barriers I can pick up quickly, I am willing to learn. So here I am! :)

MY GOALl is to replicate a speed limiter like this https://forum.pfsense.org/index.php?topic=68865.0 (https://forum.pfsense.org/index.php?topic=68865.0). It has been written, so I don't have to start from scratch. It can be done the similar way as Hello World sample. It will end up being useful as it is one of the *Most Wanted* features.

MY BARRIERS are:

Please throw me any development experience, help me to kick start my project :) Appreciated!
Title: Re: Starting with the Development
Post by: franco on April 08, 2016, 08:07:43 am
Hi there,

Sorry, I missed this before.

PHP knowledge is good, very good. Basically for OPNsense you need a VM or hardware machine you want to work with, on that you install:

# pkg install git vim-lite

(or nano or joe for editing or get the files onto the box in any way you want)

# cd && git clone https://github.com/opnsense/core
# cd core
# make mount

The last command overlays the git onto the system, and you can start working on the code in the src/ dir.

I wrote a tutorial (a bit outdated) about how it works... http://lastsummer.de/development-workflow-in-opnsense/

More docs you'll need:

https://docs.opnsense.org/develop.html

Binding scripts or binaries to the MVC code is done via configd backend handling. You can then call this from the MVC. We can talk about this step by step as you need it.

PS: Even though Perl works, consider using Python instead.

We will have to make sure the license is ok. A clean rewrite is usually the way to do it.