Jump to content


Photo

NS.CONF Language File for Notepad++ [Download]

Started by Christian Schwendemann , 15 March 2017 - 03:02 PM
24 replies to this topic

Best Answer Christian Schwendemann , 15 March 2017 - 07:26 PM

Welcome :)

 

Johannes Norz, who is also Citrix Trainer for Networking as I am, was so nice and updated the file with some more other commands he found in his ns.conf like partition, stream and feo which I missed until now.

 

I used the chance to update at the same time the version above and add highlighting for "text" like "http.req.header.exists"

 

 

main post is updated and here - just for "version history" the file too, if you start reading here :D

Christian Schwendemann Members

Christian Schwendemann
  • 128 posts

Posted 15 March 2017 - 03:02 PM

Hi

 

I created a User Defined Language File for Notepad++ to bring the ns.conf into a colored and easy to read format :)

 

Feel free to share and post it in your blogs.

I dont claim any copyright and everybody is free to use and modify it himself.

 

I tried to cover mostly all of the commands and parameters from the product documentation and checked it with some config´s from big deployments. Hope it covers most of your ns.config´s too.
Feel free to update and share if not :)

 

 

 

All you need to do is following to install the language file (once):

Open Notepad++

(From Menue Bar) -> Language -> Define your language.. -> Import -> Select the downloaded file

Close Notepad++ and re-open it.

 

Next time you open a netscaler config in notepad++:

(From Menue Bar) -> Language -> Citrix Netscaler (on the very bottom)

- has to be selected manually, no autodetection, stays selected in a tab until its closed -

 

 

 

Looks like this:

Netscaler_v1_3_2.png

 

 

 

 

just that you dont get confused by the color concept:

 

All the -Parameters are normally light brown

Any -Parameter that refer to settings like Certificate bindings, IP Modes, SSL Settings, Priorities etc. are kept green

Some for me important like -rule or -action as well as ns_true and ns_false are kept in red

 

The rest should be self explaining :)

 

 

 

*UPDATED* v.1.3.2 :D Thanks to:
Johannes Norz for support

 

 

PS: Download Counter starts with every file update at 0 again.
Today we had all together roundabout 350 downloads :)

Attached Files



Sam Jacobs CTP Member

Sam Jacobs
  • 6,750 posts

Posted 15 March 2017 - 04:10 PM

Hey Christian,

 

Great job! Thanks for sharing!

 

Sam

P.S. Even though I'm color-blind, I can see the different colors clearly - just don't ask me what they are! :)



Julien Vailles Members

Julien Vailles
  • 54 posts

Posted 15 March 2017 - 05:10 PM

Very useful, thanks for sharing Christian! :)



Matthew Francis Members

Matthew Francis
  • 417 posts

Posted 15 March 2017 - 05:12 PM

Thanks for sharing.



Vaqar Hasan Members

Vaqar Hasan
  • 80 posts

Posted 15 March 2017 - 05:39 PM

Appreciate the sharing



Christian Schwendemann Members

Christian Schwendemann
  • 128 posts

Posted 15 March 2017 - 07:26 PM

Welcome :)

 

Johannes Norz, who is also Citrix Trainer for Networking as I am, was so nice and updated the file with some more other commands he found in his ns.conf like partition, stream and feo which I missed until now.

 

I used the chance to update at the same time the version above and add highlighting for "text" like "http.req.header.exists"

 

 

main post is updated and here - just for "version history" the file too, if you start reading here :D

Attached Files


Best Answer

Gareth Carson Members

Gareth Carson
  • 20 posts

Posted 15 March 2017 - 09:09 PM

Thanks for the community share!

Johannes Norz Members

Johannes Norz
  • 566 posts

Posted 16 March 2017 - 04:09 AM

Chris, it's realy worth while using it. I put it into my link collection I use to give to students and cotumers!

 

Best

 

Johannes



Salim Hurjuk Members

Salim Hurjuk
  • 167 posts

Posted 16 March 2017 - 05:42 AM

Chris- 

 

Its really worth and easy to install.

 

Thanks. Great



Bernd Klaus Members
  • #10

Bernd Klaus
  • 25 posts

Posted 16 March 2017 - 07:35 AM

Danke Christian! ;)



Christian Tinello Members
  • #11

Christian Tinello
  • 22 posts

Posted 16 March 2017 - 08:16 AM

Awesome, 

thanks for sharing...



William Fulmer Members
  • #12

William Fulmer
  • 127 posts

Posted 16 March 2017 - 02:43 PM

Christian

This is great! Thank you



David Pisa Members
  • #13

David Pisa
  • 43 posts

Posted 21 March 2017 - 03:49 PM

This is absolutely awesome!!!



Reinier Sanchez Citrix Employees
  • #14

Reinier Sanchez
  • 1 posts

Posted 22 March 2017 - 07:15 PM

Cool, thx.



Bob Kenyon Citrix Employees
  • #15

Bob Kenyon
  • 1 posts

Posted 22 March 2017 - 10:21 PM

This is very awesome. I love it.

 

One problem I noticed though is that the escapes in appfw profile expression paths are throwing off the parser:
 

ns.conf context coloring sample appfw.PNG



Christian Schwendemann Members
  • #16

Christian Schwendemann
  • 128 posts

Posted 23 March 2017 - 08:06 AM

thanks :)
 

Huh that one was a hard nut to crack

Notepad++ didnt accept it when ((EOL)) - which is their way to check different end of line types - is placed at the end of the expressions.

 

Got it now

 

*EDIT*

 

oops just saw that it then doesnt accept the second " for any reason even as it looks right in the source code of the file

very strange..

 

sorry seems the only solution would be that you temporary add a second " in your expression.

What would happen with the expression if you forget about the second "?
Think it wouldnt hurt the expression, would it?

 

btw offtopic:

would the appfw also catch &quot then, which is html for "?



Jani Kohonen Members
  • #17

Jani Kohonen
  • 192 posts

Posted 23 March 2017 - 12:56 PM

Well done Chris and Johannes! :)



Martin Meier Members
  • #18

Martin Meier
  • 12 posts

Posted 28 March 2017 - 12:29 PM

Really great, loving it  :wub:

 

Maybe you can add Support for SSL-Profiles?

 

I added -sslProfile as keyword in group 4 and the default profile values ns_default_ssl_profile_frontend and 

ns_default_ssl_profile_backend to group 6.



Christian Schwendemann Members
  • #19

Christian Schwendemann
  • 128 posts

Posted 29 March 2017 - 06:39 AM

:)

 

cool thanks for the hint.

I am teaching a Citrix Netscaler Class (CNS-220) this week and will compare the results on Friday and add some more as well as your mentioned -sslprofile´s

 

if you find more, anytime you can click Export and create a new Version and post it here as attachment, I´ll update the Main Thread then.

 

So come back on Friday evening or subscribe to the thread to stay tuned :)



Jay Chandrasekar Citrix Employees
  • #20

Jay Chandrasekar
  • 11 posts

Posted 30 March 2017 - 05:07 PM

very cool. thanks!